OleDbError serializable

OleDbError serializable

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

This class represents one or more data source errors, but it isn't an exception. Instead, the data source may report multiple errors, and multiple OleDbError instances may be added to a single OleDbErrorCollection , which are then accessed using the OleDbException.Errors property of the exception that is raised.

OLE DB errors contain information including a database-specific error code ( NativeError ), a five-character code following the ANSI SQL standard ( SQLState ), and a descriptive text message ( Message ).

 public sealed class  OleDbError  {  // Public Instance Properties  public string  Message  {get; } 
   public int  NativeError  {get; } 
   public string  Source  {get; } 
   public string  SQLState  {get; }  // Public Instance Methods  public override string  ToString  (  );  // overrides object  } 

Returned By

OleDbErrorCollection.this

OleDbErrorCollection serializable

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

Contains a collection of OleDbError instances, which is used by the OleDbException.Errors property to indicate all errors that have occurred while using the OLE DB data provider. This collection always contains at least one OleDbError object.

 public sealed class  OleDbErrorCollection  : ICollection, IEnumerable {  // Public Instance Properties  public int  Count  {get; }  // implements ICollection  public OleDbError  this  [int   index   ]{get; }  // Public Instance Methods  public void  CopyTo  ( Array   array   , int   index   );  // implements ICollection  public IEnumerator  GetEnumerator  (  );  // implements IEnumerable  } 

Returned By

OleDbException.Errors , OleDbInfoMessageEventArgs.Errors

OleDbException serializable

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

This exception represents a data source error. For example, if you attempt to execute a SQL statement that is syntactically incorrect or open a connection to a database server that can't be found, this exception is thrown. Every OleDbException contains at least one OleDbError object with data about the problem in the OleDbErrorCollection object. Errors that happen while disconnected from the data source (such as violating a System.Data.DataSet constraint or attempting to access a deleted row) result in a more specific exception from the System.Data namespace.

 public sealed class  OleDbException  : System.Runtime.InteropServices.ExternalException {  // Public Instance Properties  public override int  ErrorCode  {get; }  // overrides System.Runtime.InteropServices.ExternalException  public OleDbErrorCollection  Errors  {get; } 
   public override string  Message  {get; }  // overrides Exception  public override string  Source  {get; }  // overrides Exception   // 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 System.Runtime.InteropServices.ExternalException figs/u2192.gif OleDbException