Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    1

    Unanswered: Help with connecting Mysql to an asp page

    Can Someone Please help me with the code to connecting a MYsql db to an ASP page. i would apprecate anyhelp. I am new at programming, Thanks

  2. #2
    Join Date
    Sep 2003
    Location
    Sprint World Campus
    Posts
    7

    Re: Help with connecting Mysql to an asp page

    You will need to install the mysql ODBC driver on the server, but after that, you setup a connection one of the 2 ways below, and the SQL syntax is virtually the same.

    DSNLESS:
    [cut]
    dim oConn
    set oConn = Server.CreateObject("ADODB.Connection")
    oConn.Open "Driver={MySQL ODBC 3.51 Driver};" & _
    "Server=servername;" & _
    "Port=3306;" & _
    "Option=131072;" & _
    "Stmt=;" & _
    "Database=dbasename;" & _
    "Uid=user;" & _
    "Pwd=password"
    [uncut]

    DSN CONNECTION
    [cut]

    dim oConn
    set oConn = Server.CreateObject("ADODB.Connection")
    oConn.Open "DSN=mySystemDSN;" & _
    "Uid=myUsername;" & _
    "Pwd=myPassword"
    [uncut]

    Any questions?

    -Jeremy




    Originally posted by tornado973
    Can Someone Please help me with the code to connecting a MYsql db to an ASP page. i would apprecate anyhelp. I am new at programming, Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •