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

Pass Through SQL Query

Experts:

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.

thanks
m
0
MIKE
Asked:
MIKE
  • 2
  • 2
1 Solution
 
napel25Commented:
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.
0
 
MIKESoftware Solutions ConsultantAuthor Commented:
Nape:

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?"
0
 
napel25Commented:
ahh..okay
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.
0
 
MIKESoftware Solutions ConsultantAuthor Commented:
Nape...thanks for  your help.
M
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

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