How do I change my DSN to DSN-less connection?

Databases

   Most of the problems are in choosing right connection string. Here is an example of tested connection string to MS Access database: 
    
   We suppose that your database resides in “DB” subfolder and it name is “TestDB.mdb”. 
   You’ll have to use Server.MapPath(“DB\TestDB.mdb”) in order to get physical location of database. 
   So connection string would be: 
    
   "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("DB\TestDB.mdb") 
    
   And the way to utilize it: 
    
   ConnectionString = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("DB\TestDB.mdb") 
   Set DbConnection = Server.CreateObject("ADODB.Connection") 
   DbConnection.Open ConnectionString