Hello,
I'm trying to connect to a Mysql5-odbc database, but the server returns such error: "unsupported 'dsn' keyword".
I set up an ODBC connection (which works) and added this string to the webconfig file:
Although you can use the standard ODBC, I have found it to be extremely buggy with MySQL Database. You may want to try using MyODBC (MySQL ODBC driver). Here is the download link:
Silvestro_in...
Member
66 Points
17 Posts
unsupported 'dsn' keyword
Sep 14, 2006 02:40 PM|LINK
I'm trying to connect to a Mysql5-odbc database, but the server returns such error: "unsupported 'dsn' keyword".
I set up an ODBC connection (which works) and added this string to the webconfig file:
<add name="db1" connectionString="DATABASE=mydb1;DSN=mydb1;SERVER=localhost;UID=root" providerName="System.Data.Odbc" />
In the webpage, I put this code:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:db1 %>"
SelectCommand="SELECT [*] from [column1]" ></asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1">
</asp:GridView>
How can I fix it?
Thank you very much
digioz
Member
305 Points
80 Posts
Re: unsupported 'dsn' keyword
Sep 23, 2006 10:02 PM|LINK
Although you can use the standard ODBC, I have found it to be extremely buggy with MySQL Database. You may want to try using MyODBC (MySQL ODBC driver). Here is the download link:
http://dev.mysql.com/downloads/connector/odbc/3.51.html
http://www.digioz.com
Silvestro_in...
Member
66 Points
17 Posts
Re: unsupported 'dsn' keyword
Sep 30, 2006 04:09 PM|LINK