SQLState Property - ADO

Indicates the SQL state for a given Error object.

Applies To

Error

Return Values

Returns a five-character String that follows the ANSI SQL standard.

Remarks

Use the SQLState property to read the five-character error code that the provider returns when an error occurs during the processing of a SQL statement. For example, when using the Microsoft OLE DB Provider for ODBC with a Microsoft® SQL ServerÖ database, SQL state error codes originate from ODBC based either on errors specific to ODBC or on errors that originate from Microsoft SQL Server and are then mapped to ODBC errors. These error codes are documented in the ANSI SQL standard, but may be implemented differently by different data sources.

Examples

Description, HelpContext, HelpFile, NativeError, Number, Source, and SQLState Properties Example (VB)


© 1997 Microsoft Corporation. All rights reserved.