Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging ODBC errros in Access VBA

Status
Not open for further replies.

dabruins

Programmer
Mar 9, 2005
102
CA
Hi All.

I am working in Access 2003, using an Access 2000 frontend database to connect to a MySQL 5.0.18 backend database via MySql ODBC 3.51 Driver. I have some error handling in place that I have written to handle VBA errors. Usually I turn this off while I am debugging the code so I can jump to the line of code containing the error. In the case that the error originates with an ODBC call I don't get any indication of where the error occurred. If I turn on the error handling the handler has been coded to give me the ODBC error and error number but again I have no idea where the error is coming from.

Could someone tell me how to set up a debugging environment for this situation?

Thanks for your help.
 
I suspect that the people most likely to be able to help are on the MS Access or VBA forums rather than here. After you get VBA to tell you what's going on, if you find that the error is caused by a MySQL query that has a problem you can't figure out, then here is the right place to post. But it sounds like your current issue is in the ODBC error handling, and that is on Microsoft's side of the fence.

If you suspect that there is an SQL error that is not getting passed back to you through ODBC, you could try the query without ODBC as a test (log onto the server and into MySQL and type the query on the command line, or if you know how, write a little PHP or ASP page to do the query through HTTP for you) - if you do get an error, you can troubleshoot it and then make the fixes in your code, but if the query is successful, then you know the problem is in the ODBC call itself rather than the query that you are sending through the pipe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top