Export (0) Print
Expand All

OdbcDataAdapter.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.

[Visual Basic]
Public Event RowUpdating As OdbcRowUpdatingEventHandler
[C#]
public event OdbcRowUpdatingEventHandler RowUpdating;
[C++]
public: __event OdbcRowUpdatingEventHandler* 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 OdbcRowUpdatingEventArgs containing data related to this event. The following OdbcRowUpdatingEventArgs properties provide information specific to this event.

Property Description
Command Gets or sets the OdbcCommand to execute when Update is called.
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 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.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

OdbcDataAdapter Class | OdbcDataAdapter Members | System.Data.Odbc Namespace

Show:
© 2014 Microsoft