ADO Connection Object
The ADO Connection Object is used to create an open connection to a data source.
Example:-set connect = Server.CreateObject(“ADODB.connection”)
where connect is a variable of connection object.
Open The Open method opens a connection to a data source. The connection should be open to execute commands against the data source.
Syntax:-Objconnection.Open connectionstring, userID, password, options
Where connectionstring is a string value that contains information about the connection, userID is a string value that contains a username for the connection and password is a string value that contains a password for the connection.
STR="PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & SERVER.MapPath("customerdata.MDB") (NOTE: customerdata.mdb is the name of the database)
Close The Close method is used to close a Connection object if it is open.