用代码动态指定
dataAdapter.InsertCommand对象;
也就是生成多个SqlCommand对象。
如果要更新就调用dataAdapter.Update(datatable表);
dataAdapter.InsertCommand对象;
也就是生成多个SqlCommand对象。
如果要更新就调用dataAdapter.Update(datatable表);
@你的参数名1 数据类型,
@你的参数名2 数据类型,
.....
@你的参数名n 数据类型
as
begin
insert代码
// insert into 表名(字段名)values(@你的参数名X)
//values中的参数对应字段名
end
//这是我上次写的程序的一段
//mftCheckData是一个强类型的数据集this.dataAdapter.InsertCommand = this.manifestListInsertCommand;
this.dataAdapter.Update(this.mftCheckData.MFT_Manifest_List_Tab);
this.dataAdapter.InsertCommand = this.manifestCheckInsertCommand;
this.dataAdapter.Update(this.mftCheckData.MFT_ManifestCheck_Tab);
this.dataAdapter.InsertCommand = this.BillCheckInsertCommand;
this.dataAdapter.Update(this.mftCheckData.MFT_BillCheck_Tab);