ADODB Object
 
Syntax
 
long = errorobject.Source
 
Description
Returns a string that is the name or ID of the object or application that generated the error.
 
The Source property returns a string value that is the name of the object or application that generated the error. Remember that errors can be generated by both ADO and the underlying data source (provider).
 
For ADO, the returned value will be of the format "ADO.objName" where objName is the name of the object that originated the error.
See Also
Description, HelpContext, HelpFile, Record.Source, Recordset.Source.
Example
 
Dim ErrorInfo As String
 
For Each objError in objConnection
   ErrorInfo = "Description; " & objError.Description & vbNewline & _
      "Help Context: " & objError.HelpContext & vbNewline & _
      "Help File: " & objError.HelpFile & vbNewline & _
      "Native Error: " & objError.NativeError & vbNewline & _
      "Number: " & objError.Number & vbNewline & _
      "Source: " & objError.Source & vbNewline & _
      "SQL State: " & objError.SQLState & vbNewline
 
   Debug.Print ErrorInfo
Next