What type of connection string should I be using to connect to my database?

The following examples are recommended DSN-less connection strings for use with the MS Access, MS SQL Server, and MySQL database types that are supported by Alentus.

These DSN-less connection strings can be added to your scripts and changed at your discretion without intervention from Alentus personnel.  

MS Access 2000 - Virtual Path (Recommended)
DSN_NAME = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/database/database.mdb")

MS Access 97 - Virtual Path (Recommended)
DSN_NAME = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/database/database.mdb")

MS SQL Server 7 or 2000 - OLEDB connection
DSN_NAME= "Provider=SQLOLEDB;Data Source=SERVER_NAME;database=DB_NAME;uid=UID;pwd=PWD;"

DSN_NAME = "driver=MySQL;server=SERVER_IP;uid=UID;pwd=PWD;database=DB_NAME"

Add Feedback