Connection members (DAO)

Applies to: Access 2013, Office 2013

Note

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

Cancel

Cancels execution of a pending asynchronous method call (ODBCDirect workspaces only).

Close

Closes an open Connection.

CreateQueryDef

Creates a new QueryDef object.

Execute

Runs an action query or executes an SQL statement on the specified object.

OpenRecordset

Creates a new Recordset object and appends it to the Recordsets collection.

Properties

Name

Description

Connect

Sets or returns a value that provides information about the source of an open connection. Read/write String.

Database

Returns the Database object that corresponds to this connection (ODBCDirect workspaces only).

Name

Rreturns the name of a Connection.

QueryDefs

Returns a QueryDefs collection that contains all of the QueryDef objects of the specified connection. Read-only.

QueryTimeout

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.

RecordsAffected

Returns the number of records affected by the most recently invoked Execute method.

Recordsets

Returns a Recordsets collection that contains all of the open recordsets in the for the specified connection. Read-only.

StillExecuting

Indicates whether or not an asynchronous operation (that is, a method called with the dbRunAsync option) has finished executing (ODBCDirect workspaces only).

Transactions

Returns a value that indicates whether an object supports transactions. Read-only Boolean.

Updatable

Returns a value that indicates whether you can change a DAO object. Read-only Boolean.Read-only.