The ADO specification defines Error objects in an Errors collection. Each Error object holds a message from the underlying provider. ADO does not provide for provider-specific diagnostic information. ADO and the Microsoft OLE DB Provider for SQL Server map the parts of Microsoft® SQL Server™ messages into these ADO Error object properties:
Contains the SQL Server message description, usually from the description column in master.dbo.sysmessages.
Contains the five-character SQLSTATE code generated by the OLE DB Provider for SQL Server.
Contains the SQL Server error number. For example, if a statement raises a SQL Server error 170 (syntax error), 170 is returned in NativeError.
Errors Collection and Error Object