New Capabilities with ODBCDirect

Server Connections

Available only in the ODBCDirect object model, the new CdbConnection object contains information about a connection to an ODBC data source, such as the server name, the data source name, and so on. It is similar to a CdbDatabase object and will look very familiar if you have ever opened a CdbDatabase object on an ODBC data source. In fact, a CdbConnection object and a CdbDatabase object represent different references to the same object. New properties on each of these two object types allow you to obtain a reference to the other corresponding object, which simplifies the task of converting existing ODBC client applications that use Microsoft Jet to use ODBCDirect instead.

Batch Updates

A new batch update cursor is available for client applications that need to work with a cursor without holding locks on the server or issue update requests one record at a time. Instead, the client stores update information on many records in a local buffer (or "batch"), and then issues a batch update.

Because of the time lag between opening a CdbRecordset and sending a batch of updates from that CdbRecordset back to the server, other users have an opportunity to change the original data before your changes are sent to the server, so your changes "collide" with another user's changes. Several new features are available to help you determine where such collisions have occurred following a batch update and to give you some options for resolving them.

Asynchronous Method Execution

The Execute, MoveLast, OpenConnection, and OpenRecordset methods feature the dbRunAsync option. This allows the client application to do other tasks (such as loading forms, and so on) while the method is executing. You can also poll to see whether the task is complete and terminate an asynchronous task.

Client Support for ODBC Cursors

Four different CdbRecordset types support the following ODBC cursor types:

ODBC cursor CdbRecordset type
Dynamic dbOpenDynamic (New in DAO 3.5)
Dynaset dbOpenDynaset
Forward-Only dbOpenForwardOnly (New in DAO 3.5)
Static dbOpenSnapshot