DSN-Less Connection to MySQL
To access a MySQL database in ASP you can use the following script:
Function getDBConn()
Set conDB=Server.CreateObject("ADODB.Connection")
conDB.Open "Driver={MySQL ODBC 3.51 Driver};" & _
"Server=mysql.myserver.net;" & _
"Port=3306;" & _
"Option=131072;" & _
"Stmt=;" & _
"Database=mydatabase;" & _
"Uid=myname;" & _
"Pwd=mypassword"
End Function
Remember to change the Server address to the address of your MySQL database; also you will need to change the Database, Uid and Pwd parameters as appropriate. If you are unsure of any of these settings contact WebMe support through your Control Panel.
See how to access a MySQL database using PHP.
|