System.Data.Common (system.data.dll) |
abstract class |
This System.EventArgs class provides data for
event handlers for the RowUpdated event of the
DataAdapter . This includes the command that was
just completed (Command ); any errors that were
encountered (Errors ); the number of rows that
were changed, inserted, or deleted in response to the command
(RecordsAffected ); the type of SQL statement the
command executed (StatementType ); and the
relevant System.Data.DataRow object
(Row ). You can set the Status
property to
System.Data.UpdateStatus.SkipCurrentRow to bypass
a row if there was an error. One easy way to determine if an error
occurred is simply to check the number of records affected. If this
value is 0, the statement did not complete as expected.
Each provider derives a provider-specific version of the
RowUpdatedEventArgs class. Although the
RowUpdated event is supported by most
DataAdapter objects. It isn't
part of any interface or either base class
(DataAdapter or
System.Data.IDbDataAdapter ). Hence, you
can't attach a generic event handler to this event.
public abstract class RowUpdatedEventArgs : EventArgs {
// Protected Constructors
protected RowUpdatedEventArgs(System.Data.DataRow dataRow, System.Data.IDbCommand command,
System.Data.StatementType statementType, DataTableMapping tableMapping);
// Public Instance Properties
public IDbCommand Command{get; }
public Exception Errors{set; get; }
public int RecordsAffected{get; }
public DataRow Row{get; }
public StatementType StatementType{get; }
public UpdateStatus Status{set; get; }
public DataTableMapping TableMapping{get; }
}
Hierarchy
System.Object
System.EventArgs RowUpdatedEventArgs
Subclasses
System.Data.OleDb.OleDbRowUpdatedEventArgs
, System.Data.OracleClient.OracleRowUpdatedEventArgs
, System.Data.SqlClient.SqlRowUpdatedEventArgs
Returned By
DbDataAdapter.CreateRowUpdatedEvent( )
Passed To
DbDataAdapter.OnRowUpdated( )