下面这个代码是用SQL语句加载builder并能存盘,如果要加载存储过程该怎么用呢?
string ss2="select * from 表1";
dadapter3 = new SqlDataAdapter();
dadapter3.SelectCommand = new SqlCommand(ss2, myConn);
dset3 = new DataSet();
dadapter3.Fill(dset3, "UserTable");
builder = new SqlCommandBuilder(dadapter3);
bindingSource3 = new BindingSource();
bindingSource3.DataSource = dset3;
bindingSource3.DataMember = "UserTable";
this.dataGridView3.DataSource = bindingSource3;
bindingNavigator3.BindingSource = bindingSource3; 存盘代码: dadapter3.Update(dset3, "UserTable");
string ss2="select * from 表1";
dadapter3 = new SqlDataAdapter();
dadapter3.SelectCommand = new SqlCommand(ss2, myConn);
dset3 = new DataSet();
dadapter3.Fill(dset3, "UserTable");
builder = new SqlCommandBuilder(dadapter3);
bindingSource3 = new BindingSource();
bindingSource3.DataSource = dset3;
bindingSource3.DataMember = "UserTable";
this.dataGridView3.DataSource = bindingSource3;
bindingNavigator3.BindingSource = bindingSource3; 存盘代码: dadapter3.Update(dset3, "UserTable");
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货