Thread: Asp and Mysql

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    1
    Rep Power
    0
    Does anyone know how easy it is to connect asp to mysql
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,642
    Rep Power
    4476
    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
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    1
    Rep Power
    0
    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.

Similar Threads

  1. new host server, now not seeing asp pages
    By EAD in forum ASP Programming
    Replies: 4
    Last Post: February 10th, 2004, 02:15 AM
  2. Connecting to MySql with ASP. Help PLEASE
    By john813 in forum ASP Programming
    Replies: 0
    Last Post: February 6th, 2004, 06:34 PM
  3. ASP to mySQL with no myODBC driver
    By beakertrail in forum ASP Programming
    Replies: 1
    Last Post: February 4th, 2004, 09:15 AM
  4. Does MySQL with ASP pages work on Testing server?
    By David Mills in forum ASP Programming
    Replies: 11
    Last Post: January 23rd, 2004, 02:48 AM
  5. creating database & tables using ASP
    By pdxlooie in forum ASP Programming
    Replies: 2
    Last Post: December 26th, 2003, 05:27 PM

IMN logo majestic logo threadwatch logo seochat tools logo