tags:

views:

15

answers:

2

Hi I use ADO.net and run an update query by sqldataadapter. The update query updates some records. My question is: Is it possible getting some more info for example IDs of affected records without a select query after running that update query?

+1  A: 

No, not as far as I know.

You would either have to run a select statement after to get the rows affected or if you update using a Data Table then you could get a list of the modified rows.

Barry
A: 

Not sure if this works for you. Check this DataTable.GetChanges method.

This is the closest you will get if you are loading datatable and then updating the same. If you are running only update query, then as Barry said, you will have to run select after.

Sachin Shanbhag

related questions