RowUpdatingEventArgs

RowUpdatingEventArgs

System.Data.Common (system.data.dll) abstract class

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 figs/u2192.gif System.EventArgs figs/u2192.gif RowUpdatingEventArgs

Subclasses

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

Returned By

DbDataAdapter.CreateRowUpdatingEvent( )

Passed To

DbDataAdapter.OnRowUpdating( )



ADO. NET in a Nutshell
ADO.NET in a Nutshell
ISBN: 0596003617
EAN: 2147483647
Year: 2005
Pages: 415

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net