D.1. The Connection Object

The Connection object represents a unique session with a data source. The Connection object has collections, methods, and properties associated with it. The availability of these collections, methods, and properties are dependent on the functionality supported by the provider.

D.1.1. Properties of the Connection Object

The following table lists the properties of the Connection object and a brief description of their use.

PropertyData TypeDescription
ConnectionString (default property)StringUse the ConnectionString property to specify a data source by passing a detailed connection string containing a series of argument = value statements separated by semicolons
ConnectionTimeoutLongIndicates how long to wait while establishing a connection before terminating the attempt and generating an error
ModeLongIndicates the level of permissions available for modifying data in a connection, record, or stream object
StateLongDescribes whether the connection is open or closed
CursorLocationLongAllows you to choose between various cursor locations (usually either client or server)
DefaultDatabaseStringSets or returns a string that resolves to the name of a database available from the provider
IsolationLevelLongSets or returns an IsolationLevelEnum value. The default is adXactReadCommitted
ProviderStringSets or returns a string value representing the provider name. If no provider is specified, the property will default to MSDASQL (Microsoft OLE DB Provider for ODBC)
Attributes ...

Get Access 2003 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.