Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.
Assembly: System.Data (in System.Data.dll)
When using Update, there are two events that occur per data row updated. The order of execution is as follows:
The values in the DataRow are moved to the parameter values.
The OnRowUpdating event is raised.
The command executes.
If the command is set to FirstReturnedRecord, the first returned result is placed in the DataRow.
If there are output parameters, they are placed in the DataRow.
The OnRowUpdated event is raised.
AcceptChanges is called.
The following example shows how to use both the RowUpdating and events.
The RowUpdating event returns this output:
event args: (command=System.Data.SqlClient.SqlCommand commandType=2 status=0)
The event returns this output:
event args: (command=System.Data.SqlClient.SqlCommand commandType=2 recordsAffected=1 row=System.Data.DataRow status=0)