MySQL is a small and medium website perfect database solution. If your backend MySQL database is as well as the proper structure optimization and it can be for thousands of visitors every day will not degrade server performance. In this article, I will show you how to connect to MySQL from the ASP database. You must install the MySQL ODBC driver, MYODBC 3.51 If you are not on your server yet.
<%
Dim sconnection, objconn, objRS
Sconnection = "Driver={mysql ODBC 3.51 DRIVER}; Server=localhost; database=your_mysql_db; Uid=mysql_username; Password=mysql_password; Option=3 "
Set objconn = Server.CreateObject ("ADODB. Connection ")
objConn.Open (sconnection)
Set objRS = objConn.Execute ("Select FirstName, LastName from Tblusers")
While Not objrs.eof
Response.Write Objrs.fields ("LastName") & "," & Objrs.fields ("FirstName") & "<br>"
Response.Write & ""
Objrs.movenext
Wend
Objrs.close
Set objRS = Nothing
Objconn.close
Set objconn = Nothing
%>