Possible to connect the SqlDatasource with MySQL Connector/NET or is a ODBC driver required?

 Hi,

 I am using the MySQL Connector/NET 5.2.5.0 right now to use all the membersip stuff with my MySQL 5.0 database and it works great.

 Now I want to test this example http://www.asp.net/learn/videos/video-07.aspx (databinding a gridview to a datasource and enable editing) with my new MySQL-Connection.

 But when I want to choose a connection for my SqlDataSource there is no connection listed even though I have a connection in my web.config which already works with the membership stuff.

 This is my connection string:

 

1    	<connectionStrings>
2 <add name="MySQLConnectionString" connectionString="Datasource=localhost;Database=test;Uid=root;Pwd=admin;"
3 providerName="MySql.Data.MySqlClient" />
4 </connectionStrings>

  

The only way I have managed to add a connection to the SqlDataSource was using the odbc 3.51 driver (http://dev.mysql.com/downloads/connector/odbc/3.51.html) the odbc 5.1 version doesn't even work. With ODBC I can create a connection which shows up in the connection list of the SqlDataSource. But there are problems too. For example when I come to the step to choose the columns of a table for the datasource I don't see any tables regardless of which table i choose. the only thing I see is the checkbox with the asterisk ( * ) for selecting all columns. and also the checkboxes "generate insert, update and delete statements" and "use optimistic concurrency" are greyed out.

 

So what is the right way to use the SqlDataSource with a MySQL database? The MySQL Connector/NET or do I have to use the ODBC-driver? I have problems with both but I want to focus the right way to fix that problems.

 

Thanks in advance,
jim

0
jimbojonesowns
11/26/2008 9:55:26 AM
asp.net.mysql 1929 articles. 0 followers. Follow

2 Replies
860 Views

Similar Articles

[PageSpeed] 54

Jim, I am trying to use 5.2.5.0 but will no luck, did you have the following error at somepoint with it: 

.Net Framework Data Provider.  It may not be installed

 

Thanks


Life is nothing like a box of chocolates!
0
BanBeanO
12/20/2008 1:02:53 PM

As it happens, the code is fine, my Host, dispite a number of times on me asking, did not have any connector installed at all...  3 weeks .....   hosts.... 

 

Thank you anyway

 

BB


Life is nothing like a box of chocolates!
0
BanBeanO
12/20/2008 10:05:19 PM
Reply:

Similar Artilces:

ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP Address of the server'(10048) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP of the server' (10
Hi, I am randomly getting the following error message in my application. ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP Address of the server'(10048) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP of the server' (10048) I am using .Net 2.0 with VS2005 having ODBC 3.51.14 Driver.  Can any body point out the core reasons of the above error message? Thanks. Nouman Khawaja. I do have the same problem, help me out. Thanks  If the going seems easy, You are going DownHill... When I was writing ...

System.Net.Sockets.SocketException with MySQL Connector.NET
Hi. I already tried many things and spent already 2 days without any success. Please help or I'll hang myself.I am using MySql.Data.dll  ver. 5.2.5.0 (runtime v2.0.50727) from my project (library). It works great if i use it from WindowsApplication but once i use it same way in WebApplication, it keeps throwing: The attempted operation is not supported for the type of object referencedException Details: System.Net.Sockets.SocketException: The attempted operation is not supported for the type of object referenced .. AsyncResult ias = socket.BeginConnect(endPoint, null, null);.. (or w...

mysql connector NET, web.config database connection
Hey folks!    So, what's my problem? I just started to use MySQL on one project. Database is 5.0.45-community-nt via TCP/IP. I'm using Connector NET 5.1.4 and .NET Framework 2.0. Ok, so I do get MySQL.Data and all from code behind. But I just want to use it like SQL connection, so from web.config. But when I try to do that, my connection just disappears from the list (say when you are choosing connections for datasource of web control). So obviously something is wrong in my web.config declaration of connection string:  <connectionStrings> <add name=&...

Problems connecting to MySQL through MyODBC using ODBC.NET
Help ! Another learner... I am trying to connect to mySQL through MyODBC using ODBC.NET and have the following setup on a W2K machine.... 1. mySQL 4.0.15 database up and running (visible in Services). The DB is definitely there (I can see its contents through MySQL CC) 2. I have installed MySQL ODBC 3.51 Driver and created a User DSN called myDSN. I can connect to the database via the 'Test Data Source' (at least its telling me that I've connected...) 3. Using WebMatrix, I have the following declarations in place : <%@ Page Language="VB" Debug="true" Com...

Changing MySQL connection from .net component to ODBC
Hi there, we've completed our project and managed to run everything smoothly locally. However, when we uploaded all of the files online on our domain, it turns out that the database connection we used from MySQL to ASP.net is NOT SUPPORTED by our host. We are currently using the .net MySQL Component. Our host only supports ODBC connection. We could change all our files and change the lines that uses that .net MySQL component to ODBC, however, that would take so much time that we don't have. Anyone has any suggestions? If no one does then I think it's best to re...

Can't connect to MySQL database using ODBC.NET
I recently downloaded and installed ODBC.NET from Microsoft Download Center site. I can reference the namespace (Microsoft.Data.Odbc) in my project and the code (C#) compiles just fine. However, at runtime, I cannot connect to the database. It keeps complaining about not being able to find the data source. The connection string is: "Driver={MySQL};SERVER=...;DATABASE=...;UID=...;PASSWORD=...;PORT=3306;OPTION=3;STMT=;" If I use MySQL ODBC driver, I have no problem whatsoever. The connection string is almost the same, only Driver={MySQL} is replaced by Driver={MySQL ODBC 3.5...

MySQL
Currently have a site coded in PHP but the customer wants to go to .NET. Can I use the existing MySQL DB or am I required to use MSSQL? Thanks, Ken Check out this forum which is specialized for this kind of questions: ASP.NET MySQL forumBart De Smet [MVP] Visit www.msdn.be, www.bartdesmet.net...

ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'localhost' (10061)
Greetings all! I have this weird error "ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'localhost' (10061)" on my website that is supposed to connect to a MySQL database on a different server (NOT localhost). Here's the scenario: I develop my ASP.Net 2.0 website on my PC using this connection string for my ObjectDataSource: <add name="ConnectionString" connectionString="Driver={MySQL ODBC 3.51 Driver};server:localhost; database=MYDBASE;uid=MYUID;pwd=MYPWD" providerName="System.Data.Odbc" /> After testing and finding all pages working fine, I changed my co...

ERROR [HYT00] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'work' (10050)
Hi  I am facing problems with connecting to MySQL, I am using the same settings as before and earlier I was able to connect. I formatted the machine and now am getting problems.The following is my connection string:<add key="ConnectionString" value="Driver={mySQL ODBC 3.51 Driver};Server=servername;Database=dbname;Uid=uid;Pwd=pwd;Option=3;" />and I receive the following error:ERROR [HYT00] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'work' (10050) Please help me on this front. ThanksSandyLooking to check the time, goto http://whatisthe...

MySQL .Net Connector / PermissionState
HiI have written a WindowsControlLibrary that needs to connect to MySQL from an aspx page. I need a way to write the following code with the mysql-connector-net-5.1.3new System.Data.SqlClient.SqlClientPermission (PermissionState.Unrestricted).Assert();SqlConnection MSconn = new SqlConnection(MSSQLConn); MSconn.Open();//Do my insert. System.Data.SqlClient.SqlClientPermission.RevertAssert();  The MySql driver does not seem to have the Permissions........ It does have a MyClientFactory  Members which has a CreatePermission method I am just not sure how to work with it.  Any ...

MySql Connector .NET and the DbProviderFactory
Hi there... I have downloaded the MySql Connector .NET form www.mysql.com . My connectionstring uses the MySql.Data.MySqlClient provider. When i use the DbProviderFactiry to create connections, readers and so on, it comes up with and error, saying that the provider has not been installed proberly... What is the proper way? If i don't use the DbProviderFactiry, and use the MySql Connector .NET like this:             MySqlDataReader reader = null;             try  &n...

Connecting to MySQL from VS.Net
I can connect to SQL server in VS.Net, but I cannot get to connect to my remote MySQL server. It would be great if I could use the same UI to admin the two server. Anyone know how I can do this ?...

ADO.NET MySql Connector
I am having an issue with parameterized queries. I am using the .NET connector. Dim connStr As String connStr = "server=localhost;user id=root; password=pwd; database=test; pooling=false" Dim conn As New MySqlConnection(connStr) Dim command As New MySqlCommand("INSERT INTO pictures(name,filename) VALUES (@name,@filename)", conn) command.Parameters.Add("@name", txtName.Text) command.Parameters.Add("@filename", txtFilename.Text) conn.Open() command.ExecuteNonQuery() ...

Which mySql connector for which .NET version
Hi all,I couldn't find out which connectors target which .net versions. I have tried http://dev.mysql.com/downloads/connector/ but could not see which are meant to target which .NET versions.Thanks for your time.  http://dev.mysql.com/downloads/connector/net/5.2.htmlI guess this connector is backward compatible too, like the Oracle's.. So you may not have any issues Kumar Reddi As I understand it, you have the following: 5.2 is intended for VS 2008/.NET 3.5 5.1 is intended for VS 2005/.NET 2.0 as well as the Compact Framework 2.0 5.0 is unclear though it is appare...

Web resources about - Possible to connect the SqlDatasource with MySQL Connector/NET or is a ODBC driver required? - asp.net.mysql

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013

Using The LINQDataSource
-*+There is a new datasource control available in Visual Studio that works in much the same way as the SQLDataSource and the ObjectDataSource. ...

moredotnet
M ore d otnet .NET Interview Questions, ASP.NET, C#, VB.NET, XML, SQL Check Out http://www.dotnetUncle.com √ .NET NOTES OOPS in .NET .NET ...

Architectural Overview of the Windows Presentation Foundation Beta 1 Release
Introduction Windows Presentation Foundation Beta 1 Windows Integration New Features WinFX SDK Exploring the New Features Introducing "Express" ...

About Mikesdotnetting
I started this site as somewhere to store answers to bits and pieces that I see asked frequently in the forums at www.asp.net . Rather than type ...

Using MiniProfiler with SqlDataSource ASP.NET WebForms Control
public class ProfiledSqlDataSource : SqlDataSource{ protected override DbProviderFactory GetDbProviderFactory() { // get the "base" DbProviderFactory ...

ASP.NET Pivot Table - RadPivotGrid for ASP.NET AJAX
... reports. RadPivotGrid allows easy customization of all data reports. Try now! Use any declarative data source control (AccessDataSource, SqlDataSource, ...

Sign on
Sign On • Join • Forums Home User Name * Password * Remember me next time ( I forgot my password ) SUBMIT YOUR WTF Content Random Article All ...

ComboBox Sample
ComboBox is an ASP.NET AJAX control that, like the AutoCompleteExtender , combines the flexibility of a TextBox with a list of options that users ...

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013

Resources last updated: 12/6/2015 10:16:13 AM