MySQL Connector/NET 5.2 main features
- A new profile provider has been implemented along with a fully revamped provider schema.
- New bulk loading and script execution classes are available.
- The ability to clear a single or all connection pools.
- Integration into Visual Studio 2008
- MySqlDataAdapter now supports batching
- BINARY(16) columns are now treated as GUIDs
- Various changes in how we handle parameters.
How to use the MySQL Connector/NETIn order to use this component you have to add a reference to the MySql.Data.dll (from the MySQL Connector/NET package you downloaded form MySQL web site).
string connString = "SERVER=localhost;" +
MySqlConnection conn = new MySqlConnection(connString);
MySqlCommand command = conn.CreateCommand();
command.CommandText = "select * from table";
reader = command.ExecuteReader();
// Read the value...
string value = reader.GetValue(0).ToString();
Here you can read more about how to use command parameters with MySQL and C#: The ADO.NET command parameters