+ Reply to Thread
Results 1 to 4 of 4

Thread: Problem with MySQL and ASP.NET

  1. #1
    devottam is offline x10Hosting Member devottam is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    2

    Unhappy Problem with MySQL and ASP.NET

    Hi guys,

    I've been trying to load my site which is in ASP.NET. Thinking it would be good to test before uploading the whole site, I wrote very simple code to test connectivity to database (MySQL) and creating a table.

    First I tested on my machine (which has MySQL 5.1 community server and ODBC driver 5.1) it ran without any glitch. Then I uploaded the files and created database in mysql server (x10hosting).

    Page loads fine but when i click to crate the table it shows an error about libodbc.so file.

    the error looks like this

    "libodbc.so
    Description: HTTP 500. Error processing request.
    Stack Trace:
    System.DllNotFoundException: libodbc.so at (wrapper managed-to-native) System.Data.Odbc.libodbc:SQLAllocHandle (System.Data.Odbc.OdbcHandleType,intptr,intptr&) at System.Data.Odbc.OdbcConnection.Open () [0x00000]"


    I am confused as what to do.
    Thank you in advance.
    Enjoy.

  2. #2
    newjazz is offline x10Hosting Member newjazz is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    4

    Re: Problem with MySQL and ASP.NET

    same problem with PHP accessing mySQL,,, :dunno:

  3. #3
    Hue Kares's Avatar
    Hue Kares is offline x10Hosting Member Hue Kares is an unknown quantity at this point
    Join Date
    Feb 2009
    Location
    UK
    Posts
    38

    Re: Problem with MySQL and ASP.NET

    Quote Originally Posted by devottam View Post
    First I tested on my machine (which has MySQL 5.1 community server and ODBC driver 5.1) it ran without any glitch. Then I uploaded the files and created database in mysql server (x10hosting).
    devottam, don't use the ODBC driver, use the .Net connector instead... Follow the instructions in this tutorial to successfully connected to a SQL database using ASP/Net. If you require further information, please post back; someone will help you.

  4. #4
    devottam is offline x10Hosting Member devottam is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    2

    Re: Problem with MySQL and ASP.NET

    @ Hue Kares
    thank you !

    well the stuff on the link is good and insightful but the web.config file looks messy coz same thing is defined multiple times.
    here is mine that i used

    <?xml version="1.0"?>
    <configuration>
    <system.web>
    <customErrors mode="Off"/>
    <compilation>
    <assemblies>
    <add assembly="MySql.Data"/>
    </assemblies>
    </compilation>
    </system.web>
    <connectionStrings/>
    </configuration>

    the connection worked and i am happy.
    thank you!

+ Reply to Thread

Similar Threads

  1. How to get ASP.Net to work at x10Hosting
    By Hue Kares in forum Tutorials
    Replies: 56
    Last Post: 11-11-2011, 01:09 PM
  2. How to get ASP.Net to work with MySql at x10Hosting
    By spangeman in forum Tutorials
    Replies: 4
    Last Post: 04-09-2010, 08:33 PM
  3. MySql + ASP.net Connections problem..
    By monsterhit in forum Programming Help
    Replies: 3
    Last Post: 12-10-2009, 01:28 AM
  4. asp.net and mysql connection problems
    By diesel543 in forum Programming Help
    Replies: 6
    Last Post: 08-16-2009, 09:04 AM
  5. Problem using MYSQL with ASP.NET
    By hansruedi in forum Programming Help
    Replies: 3
    Last Post: 04-24-2009, 03:50 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers