Re: Slow Query
- From: MGFoster <me@xxxxxxxxxxx>
- Date: Tue, 12 Jul 2005 01:13:30 GMT
Bdavis wrote:
Ok, aliases are not a problem. I'm not familiar with Pass-through queries. how do they work?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Pass-thru queries are queries written in the syntax of the DB server. It looks like you're using SQL Server so, you'd use T-SQL syntax & language to create the query.
How to create a pass-thru query:
1. Open a new query in design mode. 2. On the menu bar click Query > SQL Specific > Pass-Through. 3. In the SQL view type in the T-SQL command that will read data ONLY from the DB server. IOW, you can't use the names of tables in the Access file, only the tables on the SQL Server. 4. On the menu bar click View > Properties - the Query Properties dialog box will appear. 5. In the ODBC Connect Str property put the correct ODBC connection string. E.g. (a DSN-less connection string [all one line]):
ODBC;Driver=SQL Server;Server=myServerName;Database=MyDatabaseName; Trusted_Connection=Yes;
Trusted_connection means use Windows authentication.
Each connection string depends on the environment. Find out the name of your server, or it's IP address, the database name and if you can use Windows authentication to log on to the SQL Server. If not in place of the Trusted_Connection parameter, use:
UID=LoginName;PWD=SQLServerPassword
Substitute your login for "LoginName" and that user's SQL Server password for "SQLServerPassword."
6. Test the query. 7. Save the query.
For more info read the Access article on Pass-thru queries and the SQL Server Books On Line (BOL) documentation on T-SQL. -- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA)
-----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv
iQA/AwUBQtMZNIechKqOuFEgEQJglQCg7bN1qDBqLDc6TbL4jXkQDQVb/tsAnipK R1rxkwaVo/o75GdzI0VOq7r/ =INGA -----END PGP SIGNATURE----- .
- References:
- Slow Query
- From: Bdavis
- Re: Slow Query
- From: MGFoster
- Re: Slow Query
- From: Bdavis
- Slow Query
- Prev by Date: SQL query problem - why
- Next by Date: Re: 00-30/31-60/61-90/Over-90 Aging
- Previous by thread: Re: Slow Query
- Next by thread: numbers in chart
- Index(es):
Relevant Pages
|