How i can get the error line number with ADO

How i can get the error line number with ADO

Post by Alexey E. » Sun, 02 Nov 2003 08:53:37


While runing queries in Query Analyzer i can see detailed information about
the error, such as severity level and error line number.
I use ADO with OLE DB Provider for SQL Server for connect to MSSQL Server
2k. While processing errors i can get only error message, source and some
other info. But i can't get line number.
In BOL and MSDN i've finded that this info i can get with ODBC and OLEDB. I
can't use ODBC and i don't know how i can get erro info via OLEDB using
ADOConnection. Also in BOL and MSDN i've finded the following strange
phrase: "ADO does not support any provider-specific error interfaces, so SQL
Server-specific error information such as the severity or state are
available to ADO applications". So i can't understand: this info is
available or not? If yes, how i can get number of stored proc line with
error?