Hello!

I am interested how can I find the connection string in order to be able to connect to MySQL Server 5.1.50 using OleDbConnection(C#).

I used this auto generated string (after adding new data source in Visual Studio):

erver=localhost;User Id=MyID;password=MyPassword;database=MyDatabase

but I always get the same annoying error saying:

An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.

.
I have tried adding all possible providers but none of them seems to work.

Whoever helps me with this, I will be forever grateful!
Thanks!

I hope you already installed the MySql .Net Connector and you see MySQL Database in the data sources for your project.

Please refer to this link showing how to do the connection

Hope this helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.