Using DAO to Select a Remote Query Processor

Sometimes you need to force the remote query processor to execute the query. As discussed in "Managing DAO ODBC Connections with Jet," earlier in this chapter, opening a Database object directly can be very costly in time and network traffic because the structure of the remote database and its tables must be determined by sending a number of queries to the remote database.

In cases where you must use remote database-specific SQL syntax, or you want to use the remote database engine's query processor, you must bypass the Jet query processor by using the dbSQLPassthrough option with the DAO Execute or OpenRecordset methods. It is also possible to create DAO QueryDef objects that bypass the Jet query processor.

To use QueryDef objects, your application will need access to a Jet .mdb database. There are two kinds of QueryDef objects: