Jan 23 2007

StatementCompleted Event in SqlCommand

Category: Databases & SQLBil@l @ 21:21

A new Event in ADO.NET 2.0 has been addeed to the SqlCommand object called the *StatementCompleted* event.
Usually, if you are executing a set of UPDATE statements on your database as a batch using ExecuteNoneQuery() method, you get the number of affected rows in the whole batch action. What if you wanted to know what each UPDATE method has returned from *Rows Affected*?

The answer is this new Event. Check it on  MSDN to see how powerful it is! SqlCommand.StatementCompleted Event

Hope this helps,


Comments are closed