Use ODBCDirect with Microsoft Access

Use ODBCDirect with Microsoft Access

See Also

What Is ODBCDirect?

ODBCDirect is a technology that enables you to work with ODBC database servers without loading the Microsoft Jet database engine. ODBCDirect relies on the Microsoft DAO 3.6 object model, so that you can easily modify your existing DAO code to take advantage of ODBCDirect. Microsoft DAO 3.6 includes new objects, methods, and properties to support ODBCDirect.

Advantages of Accessing ODBC Data with ODBCDirect

ODBCDirect offers the following advantages for ODBC operations:

Creating an ODBCDirect Workspace

You can create an ODBCDirect workspace by specifying the constant dbUseODBC for the type argument of the CreateWorkspace method. You can also specify that an ODBCDirect workspace be created by default by setting the DefaultType property of the DBEngine object.

Once you've created an ODBCDirect workspace, you can use specific DAO objects, properties, and methods to work with data on the ODBC database server.

Advantages of Accessing ODBC Data with Microsoft Jet

Microsoft Jet and ODBCDirect workspaces provide different but complementary functionality. You should use a Microsoft Jet workspace to access .mdb files and ISAM data formats, such as text and spreadsheets. Microsoft Jet provides unique capabilities that aren't available through ODBCDirect, including the following:

If you don't need these capabilities, you can use an ODBCDirect workspace.

Note   You can define both Microsoft Jet and ODBCDirect workspaces in your applications and mix them in any fashion. For example, in the same function, you can define a Microsoft Jet workspace to perform DDL operations using DAO and you can also define an ODBCDirect workspace to perform asynchronous queries.