Solved

Retrieve the error number from DBMS to VB ?

Posted on 2002-07-10
3
149 Views
Last Modified: 2012-05-04
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

Thanks
Thean Keong
0
Comment
Question by:theankeong
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 50 total points
ID: 7145455
What database objects are you using? ADO + ODBC driver?
Then check the connection's NativeError value...
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8002298
Hi theankeong,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept angelIII's comment(s) as an answer.

theankeong, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 8094142
Comment from expert accepted as answer

Computer101
E-E Admin
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vbModal 12 57
Send outlook email from VBS Script 2 42
Formula problem with Excel attachment 6 38
Copy a range from 1..n excel sheets to one destination sheet 2 55
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question