On Using Pass-through Queries in MS Access
(Page 1 of 4 )
You might want to send a SQL specific query in Microsoft Access directly to the underlying ODBC database server to improve performance. You may do this by using a pass-through query. Running such queries is the topic of this tutorial.
Introduction
In earlier articles we discussed several options for working with a database backend with user interface objects created in MS Access. We considered this in the context of migrating an MS Access database to other database servers like SQL 2000, SQL 2005, and SQL Anywhere. If you want to send your SQL specific queries in Microsoft Access directly to the underlying ODBC database server, bypassing the Microsoft Jet 4.0 engine, you may do so by using a pass-through query. Removing interaction with one layer (the Jet Engine) between the client and server should improve performance. However, the syntax for the queries will be SQL specific and does not support the Jet syntax anymore.
This tutorial shows you how you may run a passthrough query on a database in the SQL 2005 server using the SQL Native Client.
Creating a Passthrough Query in Design
Create a new MS Access Database, PassThru.mdb

Highlight Queries in the left-hand objects pane, and click on New to create a query in design view.

Close the Show Table window, which may show up, by clicking on the close button. Right click on an empty area in the design and click on pass-through from the drop-down, SQL Specific -->Pass-Through as shown.

Close the Window labeled Query1:SQL Pass-Through Query.

Accept to save query. When asked for a name, provide a name; here it is passthru.

You will see the icon of the pass-through query, passthru, in the queries collection

Next: Providing the ODBC Connectivity information >>
More Microsoft Access Articles
More By Jayaram Krishnaswamy