Source Property (ADO Error)

Microsoft ActiveX Data Objects (ADO)

ADO 2.5 API Reference

Source Property (ADO Error)

Indicates the name of the object or application that originally generated an error.

Return Value

Returns a String value that indicates the name of an object or application.

Remarks

Use the Source property on an Error object to determine the name of the object or application that originally generated an error. This could be the object's class name or programmatic ID. For errors in ADO, the property value will be ADODB.ObjectName, where ObjectName is the name of the object that triggered the error. For ADOX and ADO MD, the value will be ADOX.ObjectName and ADOMD.ObjectName, respectively.

Based on the error documentation from the Source, Number, and Description properties of Error objects, you can write code that will handle the error appropriately.

The Source property is read-only for Error objects.

See Also

Visual Basic Example | Visual C++ Example | Visual J++ Example

Description Property | HelpContext, HelpFile Properties | Number Property | Source Property (ADO Record) | Source Property (ADO Recordset)

Applies To: Error Object

© 1998-2003 Microsoft Corporation. All rights reserved.