October 10th, 2000, 06:15 AM
Does anyone know how easy it is to connect asp to mysql
October 10th, 2000, 07:01 AM
I'm pretty sure you have to use ODBC to establish the connection. I'm not to familiar with ODBC or ASP, though. It's a lot easier in PHP.
October 15th, 2000, 09:32 AM
It's pretty easy. You just need to install MyODBC on the IIS server, then create an ODBC DSN for your database. Then you access via standard ADO, e.g.,
Dim cn, rs, sql
Set cn = Server.CreateObject("ADODB.Connection")
sql = "SELECT * FROM YourTable"
Set rs = cn.Execute(sql)
Do Until rs.eof
'Do somthing with the recordset here, e.g.,
'Response.Write rs("LASTNAME") & ", " & rs("FIRSTNAME") & "<br>"
'then close your objects, etc.