DataAdapter的update到底能不能改变数据库,不论我怎么用好像都没用啊!
xytme 2003-07-17 03:46:59 System.Data.OleDb.OleDbCommandBuilder custCB = new System.Data.OleDb.OleDbCommandBuilder(this.oleDbDataAdapter1 );
System.Data.DataSet custDS = new DataSet();
this.oleDbDataAdapter1.Fill(custDS,"TrackStatus");
//code to modify data in dataset here
for(int i=0;i<custDS.Tables[0].Rows.Count ;i++)
{
custDS.Tables[0].Rows[i]["Test"]="1";
}
this.oleDbDataAdapter1.Update(custDS,"TrackStatus");
上面的代码我想改变TrackStatus表中Test字段的所有值到"1",虽然custDS变了,但是使用update事件后数据源还是没有变,update方法到底怎么用啊,为什么改不了数据源?