日期:2014-05-17 浏览次数:20763 次
public static void UpdateData(DataTable tbSource)
{
tbSource.TableName = "PreLogin";
OleDbConnection objConnection = new OleDbConnection(strmdb);
string linkage = "select * from [PreLogin] where [WorkID]<10 order by [WorkID] ASC";
OleDbDataAdapter sqlAdap = new OleDbDataAdapter(linkage, objConnection);
objConnection.Open();
OleDbCommandBuilder sqlBuilder = new OleDbCommandBuilder(sqlAdap);
sqlAdap.Update(tbSource); // 这一步报错
objConnection.Close();
}