SqlCeDataAdapter.RowUpdating Event
Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.
Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.
[Visual Basic] Public Event RowUpdating As SqlCeRowUpdatingEventHandler [C#] public event SqlCeRowUpdatingEventHandler RowUpdating; [C++] public: __event SqlCeRowUpdatingEventHandler* RowUpdating;
[JScript] 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 SqlCeRowUpdatingEventArgs containing data related to this event. The following SqlCeRowUpdatingEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Command | Gets or sets the SqlCeCommand to execute when performing an Update. |
Errors (inherited from RowUpdatingEventArgs) | Gets any errors generated by the .NET Framework data provider when the Command executes. |
Row (inherited from RowUpdatingEventArgs) | Gets the DataRow to send through an Update. |
StatementType (inherited from RowUpdatingEventArgs) | Gets the type of SQL statement to execute. |
Status (inherited from RowUpdatingEventArgs) | Gets the UpdateStatus of the Command property. |
TableMapping (inherited from RowUpdatingEventArgs) | Gets the DataTableMapping to send through the Update. |
Remarks
When using Update, there are two events that occur for each 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, then the first returned result is placed in the DataRow.
- The OnRowUpdated event is raised.
- AcceptChanges is called.
Requirements
.NET Framework Security:
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code
See Also
SqlCeDataAdapter Class | SqlCeDataAdapter Members | System.Data.SqlServerCe Namespace
Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.