DAO Object
 
ODBCDirect workspaces are not supported in Microsoft Access 2013. Use ADO if you want to access external data sources without using the Microsoft Access database engine.
Connection object represents a connection to an ODBC database (ODBCDirect workspaces only).
 

Remarks

Connection is a non-persistent object that represents a connection to a remote database. The Connection object is only available in ODBCDirect workspaces (that is, a Workspace object created with the type option set to dbUseODBC).
 
Code written for earlier versions of DAO can continue to use the Database object for backward compatibility, but if the new features of a Connection are desired, you should revise code to use the Connection object. To help with code conversion, you can obtain a Connection object reference from a Database by reading the Connection property of the Database object. Conversely, you can obtain a Database object reference from the Connection object's Database property.
 
ODBCDirect workspaces are not supported in Microsoft Access 2013. Use ADO if you want to access external data sources without using the Microsoft Access database engine. A Connection object represents a connection to an ODBC database (ODBCDirect workspaces only).
 

Methods

Name
Description
Cancels execution of a pending asynchronous method call (ODBCDirect workspaces only).
Closes an open Connection.
Creates a new QueryDef object.
Runs an action query or executes an SQL statement on the specified object.
Creates a new Recordset object and appends it to the Recordsets collection.

Properties

Name
Description
Sets or returns a value that provides information about the source of an open connection. Read/write String.
Returns the Database object that corresponds to this connection (ODBCDirect workspaces only).
Rreturns the name of a Connection.
Returns a QueryDefs collection that contains all of the QueryDef objects of the specified connection. Read-only.
Sets or returns a value that specifies the number of seconds to wait before a timeout error occurs when a query is executed on an ODBC data source.
Returns the number of records affected by the most recently invoked Execute method.
Returns a Recordsets collection that contains all of the open recordsets in the for the specified connection. Read-only.
Indicates whether or not an asynchronous operation (that is, a method called with the dbRunAsync option) has finished executing (ODBCDirect workspaces only).
Returns a value that indicates whether an object supports transactions. Read-only Boolean.
Returns a value that indicates whether you can change a DAO object. Read-only Boolean.Read-only.