Connecting to MySql through ASP.NET using ODBC
<p>help me with this issue please.</p>

<p>I'm trying to connect to MySql using ASP.Net.
i'm using this code to do this:</p>

<pre><code>using System.Data;
using System.Data.Odbc;
//......
DataSet Mysql_ds = new DataSet();
OdbcConnection Mysql_con;

string Mysql_conStr = "Driver={MySQL ODBC 4.1         Driver};Server=SERVERNAME;Database=DBNAME;uid=USER;pwd=PASS";

Mysql_con = new OdbcConnection(Mysql_conStr);
Mysql_con.Open(); 
//....
</code></pre>

<p>this code works well when i use it in C#, WindowsFrom Application, BUT When I use this code in ASP.NET and upload it to my server, when i go to my website address, i get this error :</p>

<p><strong>Exception Details:</strong> System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified</p>

<p>the error line is in the last line ( Mysql_con.open() ).</p>

<p>I have searched a lot and do some tries but nothing solved yet :(
How should I solve this problem!
OR
Is there any better way to create mysql connection !?</p>

<p>here is some information about the MySql installed on the server site :</p>

<p>localhost:
Server version: 4.1.22-community-nt
Protocol version: 10
Server: localhost via TCP/IP
User: USER@127.0.0.1</p>

<p>phpMyAdmin - 2.10.1:
MySQL client version: 5.0.45
Used PHP extensions: mysql</p>
