|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Does anyone know how easy it is to connect asp to mysql
|
|
#2
|
||||
|
||||
|
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.
![]() ---JH |
|
#3
|
|||
|
|||
|
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") cn.Open "YourDSN" 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>" Loop ' ' ' 'then close your objects, etc. |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Asp and Mysql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|