ASP MySQL DSN less Connection

Discussion in 'Classic ASP' started by bestip, Jul 11, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi,

    Can any one give me the code, for how to connect mySQL using ASP with DSN Less.

    Thank You
     
  2. Bruce

    Bruce DiscountASP.NET Staff

  3. I think you have to use a DSN. I don't think that the OLEDB drivers for MySQL are installed.
     
  4. Set Con=Server.CreateObject("ADODB.Connection")
    Con.Open "accessDSN"


    accessDSN is the virtual name for my database. I hope that's what you need....
     
  5. Hi all,

    How can i use DNS for the connectivity? Because i want to connect the MySQL database which is running on another hosting server not on aspdiscount server.

    Here is the code i am trying to connect using ASP from discountASP server to abother server.

    '====================================================
    <%
    strConnection = "driver={MySQL};server=WWW.ANOTHERSERVER.COM;uid=username;pwd=password;database=db_name;option=NUM"

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

    adoConn.Open strConnection


    %>
    '==============================================================
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page