HI,
There are two options for establishing a Database Connection, one is DSNless connection and other one is DSN connection.
1.DSNless Connection:
Dim MyCon
Dim mdbFile
Dim strConString
mdbFile=Server.Mappath("mdbfilename.mdb")
strConString="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & mdbFile & ";"
Set MyCon = Server.CreateObject ("ADODB.Connection")
MyCon.Open strConString
2.DSN Connection:
For establishing a DSN connection you require a DSN on your hosting server (it may be charged, may not be charged based on your hosting server features) which will be mapped to your Access Database, for this connection code is....
Dim MyCon
Dim strConString
strConString="DSN=DSName;UID=username;PWD=password"
Set MyCon = Server.CreateObject ("ADODB.Connection")
MyCon.Open strConString
Hope this is helpful to you. Have great time.