Add a reference to MySQL

from the Artful MySQL Tips List

  • Right-click on Solution Explorer, right-click on your project, select Add Reference... from the context menu, select the Browse tab from the Add Reference dialog, navigate to the bin/.NET 2.0 folder of your most recent installation of Connector/NET 5, select MySql.Data.Dll, and click OK.
  • Double-click over your form and add using MySql.Data.MySqlClient; to the list of using declarations, so the file looks like this:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using MySql.Data.MySqlClient;

namespace MySqlTestbed {
  public partial class Form1 : Form {
    public Form1() {

Last updated 12 Jul 2019

Return to the Artful MySQL Tips page