Connection String is a string which contains database connection information and it will be passed to the Driver Manager and driver (ADO) directly. The connection string need to be formatted as below form for active server pages (ASP scripts):
For MS Access Database
'variable for your MS Access database path
db_path = "/data/database.mdb"
'variable for database user id and password
db_user = "Administrator"
db_pass = "mypassword"
'variable for connection string
db_con_str = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & db_path & ";;uid=" & db_user & ";pwd=" & db_pass & ";"
For MS SQL Server Database
db_server = ","
 db_user = "username"
db_pass = "password"
db_name = "database name"
db_con_str = "Provider=SQLOLEDB;Data Source=" & db_server & ";User ID=" & db_user & ";Password=" & db_pass & ";Initial Catalog=" & db_name
Example For My SQL Database
Dim sConnection, objConn , objRS
db_server = "My SQL server name or IP"
 db_user = "username"
db_pass = "password"
db_name = "database name"
db_con_str = "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=" & db_server & "; DATABASE=" & db_name & "; UID=" & db_user & ";PASSWORD=" & db_pass & "; OPTION=3"
Example to create ADODB connection with database
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = db_con_str
objConn.Open