System.Data.SqlClient.SqlDataAdapter cmicDa
=new System.Data.SqlClient.SqlDataAdapter("select * from t1",Cn);
System.Data.DataSet cmicDs=new System.Data.DataSet();
cmicDa.Fill(cmicDs);
System.Data.DataRow cmicDr=cmicDs.Tables[0].NewRow();
cmicDr[0]="1";
cmicDs.Tables[0].Rows.Add(cmicDr);//加入第一条数据
cmicDr=cmicDs.Tables[0].NewRow();//加入第二条数据
cmicDr[0]="2";
cmicDs.Tables[0].Rows.Add(cmicDr); System.Data.SqlClient.SqlCommandBuilder cmicCb=
new System.Data.SqlClient.SqlCommandBuilder(cmicDa);
cmicDa.Fill(cmicDs);//批量更新
注:代码没用VS.NET写,可能有语法错误。
=new System.Data.SqlClient.SqlDataAdapter("select * from t1",Cn);
System.Data.DataSet cmicDs=new System.Data.DataSet();
cmicDa.Fill(cmicDs);
System.Data.DataRow cmicDr=cmicDs.Tables[0].NewRow();
cmicDr[0]="1";
cmicDs.Tables[0].Rows.Add(cmicDr);//加入第一条数据
cmicDr=cmicDs.Tables[0].NewRow();//加入第二条数据
cmicDr[0]="2";
cmicDs.Tables[0].Rows.Add(cmicDr); System.Data.SqlClient.SqlCommandBuilder cmicCb=
new System.Data.SqlClient.SqlCommandBuilder(cmicDa);
cmicDa.Fill(cmicDs);//批量更新
注:代码没用VS.NET写,可能有语法错误。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货