Reputation: 3050
Is there any way i can get response of a Update query that how many rows has been affected ?
What I want is..
I am updating some data in Access 2010 DB table using Win Form Application, In access if i run this query it shows alert that 10 rows has been affected. how can I get this response in from application to maintain a log file of affected rows.
Upvotes: 0
Views: 42
Reputation: 6672
Use this method of your ODBC/SQL/ Command object. It returns the no. of rows affected by your query.
int rec = cmd.ExecuteNonQuery();
Upvotes: 1
Reputation: 1197
it is easy my dear friend use a Trigger in access on update. MS Access lets you design the trigger according to your need and can also return number of rows affected by update. here is a link where you can learn to create trigger
https://www.youtube.com/watch?v=wqFYvsemoZo
Upvotes: 0