1.在C#中怎样访问my SQL5.0的数据库,需要安装什么才可以?
2.SQL 中怎样访问 My SQL 数据库?

解决方案 »

  1.   

    可以用MySQLDriverCS.dll:
    using MySQLDriverCS;            MySQLConnection conn = new MySQLConnection(new MySQLConnectionString("192.168.0.163", textBox4.Text, "root", "123456").AsString);
                conn.Open();
                MySQLCommand commn = new MySQLCommand("set names gbk", conn); //latin1 gb2312 gbk utf8
                commn.ExecuteNonQuery();
                string sql = "select * from set_user";
                MySQLDataAdapter mda = new MySQLDataAdapter(sql, conn);
                DataSet ds = new DataSet();
                mda.Fill(ds, "Table");
                this.dataGridView1.DataSource = ds.Tables["Table"];
      

  2.   

    my SQL 最新版是哪一个?