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

Chapter 11. Developing an MDB Client/Ser... > Using Pass-Through Queries

Using Pass-Through Queries

Ordinarily when you store and execute a query in Access, even if it is running on remote data, Access compiles and optimizes the query. In many cases, this is exactly what you want. On other occasions, however, it might be preferable for you to execute a pass-through query because these queries are not analyzed by Access's Jet Engine. These queries are passed directly to the server, and this reduces the time that Jet needs to analyze the query and enables you to pass server-specific syntax to the back end. Furthermore, pass-through queries can log informational messages returned by the server. Finally, bulk update, delete, and append queries are faster using pass-through queries than they are using Access action queries based on remote tables. This is because the server processes the action queries rather than sending the data back to the workstation to be processed.

Pass-through queries do have their downside. They always return a snapshot, which means that they are not updateable. You also must know the exact syntax that the server requires, and you must type the statement into the Query window instead of painting it graphically. Finally, you cannot parameterize a query so that it prompts the user for a value.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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