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

Posted on 2012-08-16
Last Modified: 2012-08-23
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?

Question by:stummj
    LVL 56

    Accepted Solution

    <<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.



    Author Closing Comment

    It was DAO.errors but you pointed me in the right direction so thank you.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
    Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    730 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now