ADO Error object - Description Property

Home | About me | EXCEL VB Programming (XL97-2003) | ACCESS Programming | EXCEL VB.Net Programming | EXCEL Spreadsheet Functions Material Management  |  Guestbook
 

ADO Error object: Description Property

Syntax

objErr.Description

Returns a string that describes the error. This is the default property.

The Description property returns a string that is a brief textual description of the error. This is the default property for the Error object. Since both the provider and ADO can generate errors, either may be the source of the error.
 
It is the responsibility of the provider to pass error information, including the description string, to ADO. When an error does occur, it is the responsibility of ADO to create an Error object, which contains all of the error information, and to add that object to the Errors Collection.

 

Example

For Each objError in objConnection
   ErrorInfo = "Description; " & objError
.Description & VbCrLf &_
      "Help Context: " & objError.HelpContext & VbCrLf &_
      "Help File: " & objError.HelpFile & VbCrLf &_
      "Native Error: " & objError.NativeError & VbCrLf &_
      "Number: " & objError.Number & VbCrLf &_
      "Source: " & objError.Source & VbCrLf &_
      "SQL State: " & objError.SQLState & VbCrLf

   Debug.Print ErrorInfo
Next