CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004
    Posts
    34

    Angry Problem connecting to MySQL Database

    Hi everyone

    I am trying to connect to a MySQL database from a ".aspx" page, but getting error "Data source name not found and no default driver specified ".

    I am writing the code as follows...


    Dim con As Odbc.OdbcConnection = New Odbc.OdbcConnection
    con.ConnectionString = "STMT=;OPTION=;UID=test;PASSWORD=;DRIVER=MySQL ODBC 3.51 Driver;DESC=; DATABASE=Test_Database;SERVER=IP Address;PORT=3306"
    con.Open()

    But, If I am writing the same code in a VB.NET windows application, then the code is working fine.
    Can anybody tell me, what is the problem in my ASP.NET application, that is giving the error above mentioned.

    Thanks in advance

    Kajol

  2. #2
    Join Date
    Apr 2002
    Location
    Egypt
    Posts
    2,210

    Re: Problem connecting to MySQL Database

    Did you try both the ASPx and the windows applicaiton on the same machine ?
    generally, I have ASPx pages work fine with MySQL
    also check : http://www.connectionstrings.com
    Hesham A. Amin
    My blog , Articles


    <a rel=https://twitter.com/HeshamAmin" border="0" /> @HeshamAmin

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured