Solved

Retrieve the error number from DBMS to VB ?

Posted on 2002-07-10
3
151 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

751 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