Pass Through SQL Query

Posted on 2006-05-01
Last Modified: 2010-05-18

I get a ODBC Timed Out Error when I try to run a SQL Query in Access.

What is the correct way to setup / run a SQL Query in ACCESS so as just to use Access as the application to pull the data. I'm wanting the results of the query in Excel. I'm dialing in via CITRIX and the SERVER that Citrix resides does not have my normal Crystal Reports XI or SQL Query Analyzer loaded on it. It does however have ACCESS loaded and so I'm just trying to  use ACCESS to run the SQL for me.

Question by:MIKE
    LVL 3

    Expert Comment

    It's quite straitforward to setup a pass through query. You probably already did that right, because otherwise you didn't get a time out error. I think you can try to rise the timeout period.
    But you probably better look at network things like firewalls and protocols.
    LVL 17

    Author Comment


    I am NOT an Access person, I'm a Crystal Reports Expert...and so... how do I set the DB in Access? I'm not sure 'how' access knows to connect to the db? Is it the SQL Statement that handles the "CONNECTION?"
    LVL 3

    Accepted Solution

    I've Access 2003
    To create a pass trough query:
    - Select 'Queries' objects tab
    - Click 'New' at the top of the window
    - Select 'Design view'
    - Close 'Show table' window
    - Select 'Query' menu option of the Access window, subselect 'SQL Specific' and then 'Pass-Through'
    - right-click the blue (?) top bar of the query window and select 'properties'
    - select the 'ODBC Connect Str' propertie and click the button behind the property.
    - Now setup a proper ODBC connection.
    - After that you have to write the query in the text area of the query screen. You can use the tables on the remote server in the query you write. (this test query may work: select * from sysobjects where xtype = 'U')
    - save the query and it has to work.
    LVL 17

    Author Comment

    Nape...thanks for  your help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    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…
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    760 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

    8 Experts available now in Live!

    Get 1:1 Help Now