• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 25. Connecting to Client/Server ... > Using Access 97's SQL Pass-Through Q...

Using Access 97's SQL Pass-Through Queries

SQL pass-through queries allow you to write queries in the dialect of SQL used by the server RDBMS. SQL Server, as an example, lets you write stored procedures that you can execute by name, instead of by sending individual SQL statements to the server. Executing a stored procedure query is faster than executing the query through the Jet database engine because of reduced network traffic and faster execution of the query by the server. (Stored procedure queries are precompiled by SQL Server.) You also need to use SQL pass-through if you want to take advantage of special Transact-SQL reserved words not included in Jet SQL. In many cases, SQL pass-through queries execute faster than queries that use Jet's built-in query optimizer.

Executing a Simple Pass-Through Query

Access 1.x required that you use Access Basic to declare the functions of MSASP110.DLL, a SQL pass-through library supplied by Microsoft. Beginning with version 2.0, Access provides built-in SQL pass-through capability, similar to that offered by Visual Basic 3.0 and later. You can convert the query you created in the preceding section to a SQL pass-through query by following these steps:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint