OdbcConnection con = new OdbcConnection("Driver=SQLSERVER;Uid=root;Pwd=root");//根据具体的来填写
string commandstr = "select * from table";
OdbcDataAdapter sda = new OdbcDataAdapter(commandstr, con);
DataSet ds = new DataSet();
DataTable dt = new DataTable();
sda.Fill(ds);
dt = ds.Tables[0].Copy();
dataGridView.DataSource = dt;//dataGridView换成具体的控件名称
con.Close();
更新数据库后增加这段代码即可