asp.net.ph

OleDbDataAdapter.RowUpdated Event

System.Data.OleDb Namespace   OleDbDataAdapter Class


Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.

[ VB ]
Public Event RowUpdated As OleDbRowUpdatedEventHandler

[ C# ]
public event OleDbRowUpdatedEventHandler RowUpdated;
[ C++ ]
public: __event OleDbRowUpdatedEventHandler* RowUpdated;

In [ JScript ], you can handle the events defined by a class, but you cannot define your own.

Event Data

The event handler receives an argument of type OleDbRowUpdatedEventArgs containing data related to this event. The following OleDbRowUpdatedEventArgs properties provide information specific to this event.

Property Description
Command Gets the OleDbCommand executed when Update is called.
Errors ( inherited from RowUpdatedEventArgs ) Gets the errors generated by the .NET data provider when the Command was executed.
RecordsAffected ( inherited from RowUpdatedEventArgs ) Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
Row ( inherited from RowUpdatedEventArgs ) Gets the DataRow sent through an Update.
StatementType ( inherited from RowUpdatedEventArgs ) Gets the type of SQL statement executed.
Status ( inherited from RowUpdatedEventArgs ) Gets the UpdateStatus of the Command.
TableMapping ( inherited from RowUpdatedEventArgs ) Gets the DataTableMapping sent through an Update.

Remarks

When using Update, there are two events that occur per data row updated. The order of execution is as follows:

  1. the values in the DataRow are moved to the parameter values.
  2. the OnRowUpdating event is raised.
  3. the command executes.
  4. If the command is set to FirstReturnedRecord, then the first returned result is placed in the DataRow.
  5. If there are output parameters, they are placed in the DataRow.
  6. the OnRowUpdated event is raised.
  7. AcceptChanges is called.

See Also

OleDbDataAdapter Members   OleDbRowUpdatedEventArgs Class   OleDbRowUpdatedEventHandler Delegate Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph