Name

DBConcurrencyException

Synopsis

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 System.Exception(System.Runtime.Serialization.ISerializable) System.SystemException ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.