Creating a Connection Object

by Linda Quinn

Close Window

The ADO Connection Object provides a connection to a data store.


A connection object can be created using a Data Source Name [DSN]
or by specify the data store (data source) and data provider.



Set the connection to a DSN data provider



If DSN isn't used, a Connection String will define the data source and
   data provider.

OLE DB Connection String for an Access Database



You can also build the connection string in the Open method.




The Connection Mode defines the read/write permissions.



adModeRead Read-only permission.
adModeWrite Write-only permission.
adModeReadWrite Read and write permission.
adModeUnknown Permissions not defined.




See more connection string examples


To see the full connection string after opening:



=================================================================
This content was created by Linda Quinn of LQNet.

See http://www.lqnet.com for a great collection of articles on this and other topics.

=================================================================
Copyright © 2006-2009, LQ Systems,Inc. All rights reserved.


====================================================================
Want an expert to help with your project?    LQ Systems, Inc.   Business Solutions
====================================================================