📜  c# select Mysql代码示例

📅  最后修改于: 2022-03-11 15:05:15.437000             🧑  作者: Mango

代码示例1
DataSet ds = new DataSet();
using (MySqlConnection con = new MySqlConnection(connectionstr))
{
    using (MySqlCommand cmd = con.CreateCommand())
    {
        con.Open();
        cmd.CommandText = "select * from mysql.user;";
        MySqlDataAdapter adapter = new MySqlDataAdapter(cmd);
        adapter.Fill(ds);
    }
}