Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    3

    Unanswered: asp and mysql db - do they work together?

    Hi

    I know asp and have only used access db. I know about the limitations of access and am wanting to use another db. Is mysql a good option and does it work well with asp? If it is ok, what will I need to change within my code to link to a mysql database(must I change just the connection?)? I can provide example code if necessary.

    Muchas gracias!
    Lee

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

    Re: asp and mysql db - do they work together?

    In fact, mysql and ASP is MUCH faster and much more secure. 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 leeolive
    Hi

    I know asp and have only used access db. I know about the limitations of access and am wanting to use another db. Is mysql a good option and does it work well with asp? If it is ok, what will I need to change within my code to link to a mysql database(must I change just the connection?)? I can provide example code if necessary.

    Muchas gracias!
    Lee

Posting Permissions

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