DekGenius.com
[ Team LiB ] Previous Section Next Section

DBConcurrencyException serializable

System.Data (system.data.dll) sealed class

The exception is thrown by a DataAdapter if an attempt to update, delete, or insert a row results in zero affected rows. For example, if a data adapter attempts to execute a SQL DELETE statement to remove the record corresponding to a deleted DataRow from the data source, and no rows are deleted, this exception will be thrown. This exception usually indicates that another user has already modified the row you are attempting to update and a matching row can't be found. You can suppress the DBConcurrencyException by setting the System.Data.Common.DataAdapter.ContinueUpdateOnError property to true , in which case invalid rows are skipped, and the error information is placed in the DataRow.RowError property of rows having errors. Alternatively, you can respond to concurrency errors during the update (and suppress them if needed) by handling the data adapter's RowUpdating event.

public sealed class DBConcurrencyException : SystemException {
// Public Constructors
   public DBConcurrencyException(  );  
   public DBConcurrencyException( string message);  
   public DBConcurrencyException(string message, Exception inner);
// Public Instance Properties
   public DataRow Row{set; get; } 
// Public Instance Methods
   public override void GetObjectData(System.Runtime.Serialization.SerializationInfo si, 
        System.Runtime.Serialization.StreamingContext context);             // overrides Exception
}

Hierarchy

System.Object figs/U2192.gif System.Exception(System.Runtime.Serialization.ISerializable) figs/U2192.gif System.SystemException figs/U2192.gif DBConcurrencyException

    [ Team LiB ] Previous Section Next Section