Mysql connection string in asp
by Ramya[ Edit ] 2009-08-31 18:47:28
Mysql connection string in ASP:
To connect Mysql Database in ASP:
<%
Dim sConnection, objConn , objRS
sConnection = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=test; UID=root;PASSWORD=; OPTION=3"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open(sConnection)
Set objRS = objConn.Execute("create table test(id bigint(20) PRIMARY KEY auto_increment)")
%>
Driver : MYSQL Database Driver
Server : Your web server
Database : Database name
UID : database username
Password : database Password