Query a MySQL database using ASP/ADO via DSN

<%

Set con = Server.CreateObject("ADODB.Connection")

con.Open "DSN=<username>_mysqlConn;"

Set rs = con.Execute("SELECT * FROM tblTest")


Do While Not rs.EOF

       response.write rs.Fields("name").Value
       rs.MoveNext

Loop

rs.Close
Set rs = Nothing
con.Close
Set con = Nothing


%>

Add Feedback