Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Retrieve the error number from DBMS to VB ?

Posted on 2002-07-10
3
Medium Priority
?
153 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 200 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

688 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