• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 9607
  • Last Modified:

MS Access (VB) Runtime error 3146 ODBC Call Failed (connecting to mySQL)

Hi Experts

I have recently had to update mySQL from 5.1 to 5.5 with a MS Access 2003 front end (via ODBC links)

When I run some legacy SQL queries on Access using a form I inherited (and worked fine before the rebuild) I am getting Visual Basic Error 3146 ODBC Call Failed.

I can run the code directly within mySQL so I am at a loss what the problem might be.

I have switched ODBC Tracing on, and get the following fragment in the log - which doesnt really help much:

InterconnecTRep 90-14f0      EXIT  SQLExecDirect  with return code -1 (SQL_ERROR)
            HSTMT               0FA83860
            UCHAR *             0x11CF44B4 [    2010] "## This report currently includes ...(SQL is in here)"            SDWORD                  2010

            DIAG [S1000] [MySQL][ODBC 5.1 Driver][mysqld-5.5.27-log]Query execution was interrupted (1317)

Does anyone know how I can force more detail on the 3146 error, so it shows me what the *real* problem is?

Thanks
0
stummj
Asked:
stummj
1 Solution
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<Does anyone know how I can force more detail on the 3146 error, so it shows me what the *real* problem is?>>

Yup, you need to enumerate the errors collection.  The 3146 is just the first error and is a general message.

See:

http://support.microsoft.com/kb/209855

Jim.
0
 
stummjAuthor Commented:
It was DAO.errors but you pointed me in the right direction so thank you.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now