web 2.0

ADO Connection String

ADO Connection String This the tutorial/example  learn ADO connection string.

ShotDev Focus:
- ASP & ADO Connection string.

Microsoft Access Driver for open the connection


<%
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("database.mdb"),"user" , "password"
%>


Microsoft Access Driver (OLE DB) for Microsoft Access


<%
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("database.mdb"),"user" , "password"
%>

MySQL ODBC Driver for MySQL Database


<%
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=host;UID=user; " & _
"pwd=password;database=database;option=16384;"
%>

MySQL - (ODBC) for MySQL Database


<%
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "DSNname (ODBC)","user" , "password"
%>

SQL Server for SQL Server


<%
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "Driver={SQL Server};Server=host;Database=database;UID=user;PWD=password;"
%>

SQL Server (ODBC) for SQL Server


<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "DSN=DSNname;UID=user;PWD=password;DATABASE=database"
%>

SQL Server (OLE DB) for SQL Server


<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "PROVIDER=SQLOLEDB;DATA SOURCE=host;UID=user;PWD=password;DATABASE=database"
%>

Oracle for Oracle Database


<%
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "Driver={Oracle in OraHome92};DBQ=TNS-NAME;UID=user;PWD=password;"
%>
1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.