Retrieve the error number from DBMS to VB ?
Posted on 2002-07-10
Hi, I wanna ask on how do I retrieve the error number from a DBMS to my VB application.
For example, let say my recordset is trying to execute a select statement but the database does not have the table i want to access. Hence this will generate an error. My question is to retrieve the exact number of the error.
Note :The best I can get is with Err.Number but this just shows ODBC call failed regardless of specific error be it recordset, no connection others...
All I want is the exact error being reference by a number (eg: 123 may be for recordset error, 456 may be for error in connection to database)
This is important for me to handle error and rollback issues.
One more thing, my DBMS is Sybase SQL Anywhere