MySQL Connector/Net
This .NET Framework Class Library is provided by MySQL.
The class library is contained in the file MySql.Data.dll.
The class library is contained in the file MySql.Data.dll.
Coding
Add a reference to the assembly MySql.Data and include the MySql.Data.MySqlClient namespace. Instantiate a new MySqlConnection connection object. Set the connection string and open the connection.
VB.NET code sample
C# code sample
VB.NET code sample
Imports MySql.Data.MySqlClient
Dim myConnection As MySqlConnection = New MySqlConnection()
myConnection.ConnectionString = myConnectionString
myConnection.Open()
' execute queries, etc
myConnection.Close()
Dim myConnection As MySqlConnection = New MySqlConnection()
myConnection.ConnectionString = myConnectionString
myConnection.Open()
' execute queries, etc
myConnection.Close()
C# code sample
using MySql.Data.MySqlClient;
MySqlConnection myConnection = new MySqlConnection();
myConnection.ConnectionString = myConnectionString;
myConnection.Open();
// execute queries, etc
myConnection.Close();
MySqlConnection myConnection = new MySqlConnection();
myConnection.ConnectionString = myConnectionString;
myConnection.Open();
// execute queries, etc
myConnection.Close();
Description
Connector/NET enables developers to easily create .NET applications that require secure, high-performance data connectivity with MySQL. It implements the required ADO.NET interfaces and integrates into ADO.NET aware tools. Developers can build applications using their choice of .NET languages. Connector/NET is a fully managed ADO.NET driver written in 100% pure C#.
More info about this class library can be found at the MySQL product page.
Download
.NET Framework Class Library (MySQL Connector/Net) can be downloaded here.
Connection Strings
Additional info or comments on this class library? Want to submit content?