Name

RowUpdatingEventArgs

Synopsis

This System.EventArgs class provides data for event handlers that react to the RowUpdating event of the DataAdapter. This includes the command that is about to be executed (Command), the type of SQL statement the command will execute (StatementType), and the relevant System.Data.DataRow object (Row ). You can set the Status property to System.Data.UpdateStatus.SkipCurrentRow to bypass a row or System.Data.UpdateStatus.SkipAllRemainingRows to abort the update.

Each provider derives a provider-specific version of the RowUpdatingEventArgs class. Although the RowUpdating 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.

public abstract class RowUpdatingEventArgs : EventArgs {

// Protected Constructors

   protected RowUpdatingEventArgs(System.Data.DataRow dataRow, System.Data.IDbCommand command,

        System.Data.StatementType statementType, DataTableMapping tableMapping); 

// Public Instance Properties

   public IDbCommand Command{set; get; } 

   public Exception Errors{set; get; } 

   public DataRow Row{get; } 

   public StatementType StatementType{get; } 

   public UpdateStatus Status{set; get; } 

   public DataTableMapping TableMapping{get; } 

}

Hierarchy

System.Object System.EventArgs RowUpdatingEventArgs

Subclasses

System.Data.OleDb.OleDbRowUpdatingEventArgs, System.Data.OracleClient.OracleRowUpdatingEventArgs, System.Data.SqlClient.SqlRowUpdatingEventArgs ...

Get ADO.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.