'mysql oledb driver

how to install mysql oledb driver in local system.

please give Mysql oledb Connection string



Solution 1:[1]

Provider=OleMySql.MySqlSource.1

Solution 2:[2]

.NET Solution (c#)

You need to install MySql.Data using Package-Manager...

PM>Install-Package MySql.Data

Then, in your c# code do something like this..

using System.Data.OleDb;
using System.Data.Common;
using MySql.Data.MySqlClient;

DbProviderFactory factory = new MySqlClientFactory();
DbConnection cxn = factory.CreateConnection();
cxn.ConnectionString = "server=mysqlserver;port=3306;Database=mydb;user id=myname;password=mypass;SslMode=none;Convert Zero Datetime=True";
cxn.Open();




Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bakudan
Solution 2 fergal303