ACCESS to MYSQL Pass-Through Query

Posted on 2009-02-18
Last Modified: 2012-05-06
How can i create a dynamic pass-through query in MYSQL?

do i need to adjust my connection string?
Question by:CMDAI
    LVL 28

    Expert Comment

    I assume you are in Access creating a Pass Through query in there. Yes you can. The easiest way to get your ODBC connect string is to attach a table and then look at the Description property in the Access table design, the ODBC connect string is everything excep the TableNam at the end.

    As far as the Dynamic bit then you may need to expand. You can not include parameters as everything in the Pass Through Query has to be Server related but you could modify the SQL in code.

    Cheers, Andrew
    LVL 1

    Author Comment

    For the first part i got it,
    but im not so sure what u mean "the Pass Through Query has to be Server related"

    I copied this from the linked "inventory table"

    SELECT ID, Title FROM jnbkcrop.inventory;

    I get "Recordset is not updatable"
    LVL 28

    Accepted Solution

    A Pass Through Query is not updateable. Your ODBC setting in the pass through query would be


    The SQL in the pass through query is not interpreted / converted and is "PASSED THROUGH" as is to the server to run so the select below has to be in MySQL syntax rather than MSACCESS / JET syntax.

    SELECT ID, Title FROM jnbkcrop.inventory

    Cheers, Andrew
    LVL 1

    Author Comment

    ahh, ok.
    I was very much off on the meaning of passtrough q.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
    Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL ( several years ago, it seemed like now was a good time to updat…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
    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…

    755 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

    19 Experts available now in Live!

    Get 1:1 Help Now