Connection Strings (MSSQL 2005, MSSQL 2008, MySQL5, MS Access Database)

MSSQL2005
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLOLEDB; Data Source =mssql.yourdomain; Initial Catalog = Yourdatabase; User Id = USER; Password=PASSWORD; Network Library=dbmssocn;"
If conn.errors.count = 0 Then
Response.Write "Connected OK"

MSSQL 2008
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLOLEDB; Data Source=mssql.yourdomain,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;"
If conn.errors.count = 0 Then
Response.Write "Connected OK"

 

MySQL5 - MySQL Connector/ODBC 3.51

Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Port=3306;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;

To Know more about Connection Strings open the following link
http://www.connectionstrings.com/

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Getting "The 'microsoft.jet.OLEDB.4.0' provider is not registered on the local machine."

When you host on the 64bit servers you might get an "The 'microsoft.jet.OLEDB.4.0' provider is...

How do I use an Access database on my site?

Microsoft Access is part of the Microsoft Office suite of applications and is a database that is...

Import Export MySQL database using PhpMyAdmin

Do the following steps for import/export mysql database: Open phpMyAdmin.by going to...

What is MySQL?

MySQL is an open source database server, much like Microsoft SQL Server or Oracle. You can store...