Enabling MySQL Connector / ODBC 5.1 Application in C #

I am using System.data.odbc with "Driver = {MySQL ODBC 5.1 Driver}" in the connection string. However, I did not understand that the MySQL connector was installed on my computer, so I did not refer to it, it does not work without it. Now I need to distribute it in the application. I downloaded the MySQL Connector / ODBC 5.1 files, but with the link added, it says: "The file is unavailable ... make sure it is a valid COM .." etc. thank you

+3
source share
3 answers

MySQL Connector / ODBC , as the name implies, is the only ODBC driver for connecting to MySQL. It is not specifically for .NET, and you cannot in any way embed it in your .NET applications. This will require a separate installation on any computer where you need to use it.

MySQL Connector / Net is a fully managed ADO.NET provider for MySQL. It is designed specifically for .NET and does not require the installation of any other software. It is easy to reference and distribute in your .NET applications, you just need to use the namespace and objects System.Data.MySqlClient, not System.Data.Odbc.

+7
source

.NET DLL, . MySQL Connector , .

+1

The only thing you need is Mysql.Data.Dll. You do not need to install a full connector, all you need. This also applies to the end user, they also only need a DLL

0
source

Source: https://habr.com/ru/post/1722696/


All Articles