Accessing ODBC Data with an ODBCDirect Workspace
With ODBCDirect, you can access server data by using the existing DAO object model directly on top of the ODBC application programming interface (API). ODBCDirect implements a thin code layer over the ODBC API that establishes connections, creates cursors, and runs complex procedures using minimal workstation resources, without going through Microsoft Jet. ODBCDirect offers the following advantages:
-
Direct Access Your application can access ODBC data sources directly. You can improve performance, reduce network traffic, and take advantage of the server’s capabilities by processing more data on the server.
-
Reduced Resource Requirements You don’t have to go through Microsoft Jet, so your application requires fewer resources at the workstation. If you’re using ODBCDirect from Microsoft Access, keep in mind that Microsoft Access always loads Microsoft Jet, even though ODBCDirect operations don’t go through Microsoft Jet.
-
Improved Access to Server-Specific Functionality You can take advantage of features specific to the ODBC server that aren’t available if you’re using ODBC through Microsoft Jet. For example, in an ODBCDirect workspace, you can specify where cursors are located — on the client or on the server — for servers that support different types of cursors.
-
Asynchronous Queries You can run a query and perform other operations without waiting for the query to finish. You can then check properties to keep track of the query’s progress. You can enhance concurrency and optimize performance with asynchronous queries.
-
Batch Optimistic Updating With batch optimistic updating, you can cache recordset changes locally and then submit these changes to the server in a single batch.
-
Flexible Stored Procedure Execution You can specify input parameters and check return values from stored procedures — operations that are not possible in a Microsoft Jet workspace.
Note In an ODBCDirect workspace, you can’t modify your database’s structure using DAO methods such as the CreateTableDef method, but you can run SQL data definition language (DDL) statements using the Execute method to modify the structure of the database.
See Also For more information about these ODBCDirect features, see “The Object Model for ODBCDirect Workspaces” and “Using ODBCDirect” later in this chapter.