Name

OleDbError

Synopsis

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

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.