ADO_Connection.txt
Display Object
'-------------------
'Using A System DSN
'Create using the control panel
'-------------------
Dim objConn
Set objConn = Server.CreateObject ("ADODB.Connection")
objConn.ConnectionString = "DSN=DSNname"
objConn.Open
'---------------------
'DSN-less Connections
'----------------------------
'Microsoft Access Connection
'----------------------------
'assumes database location: \home\database\database.mdb
Dim objConn
Set objConn = Server.CreateObject ("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=D:\Inetpub\sites\Domains\<yourdomain.com>\ROOT\home\database\database.mdb"
objConn.Open
'-----------------
'MySQL Connection
Create database using control panel
'-----------------
Dim objConn
Set objConn = Server.CreateObject ("ADODB.Connection)
objConn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};Server=localhost;Database=DataBaseName;" & _
"UID=UserName;PWD=Password"
objConn.Open
'------------------------
'Closing the connections
'------------------------
objConn.Close
Set objConn = Nothing
'Don't forget to do this anywhere your code finishes
'using the database, or your database may lock!