更新access数据库某个字段内容,但是这种方法效率太低,每分钟二百多条,求大神给指条名路!急切!!
public void UpdateAccess(string updateSql, DataTable tempTable, string columnName,string signTable)
{
try
{
Connection.Open();
OleDbDataAdapter odda = new OleDbDataAdapter(updateSql, Connection);
OleDbCommandBuilder odcb = new OleDbCommandBuilder(odda);
DataSet ds = new DataSet();
odda.Fill(ds);
using (GxVLongProgress prog = new GxVLongProgress("替换符号名称", 0, ""))
{
int k = 1;
int count = tempTable.Rows.Count;
for (int i = 0; i < count; i++)
{
//进度条
prog.DoProgress(i + 1, count, "正在替换");
ds.Tables[0].Rows[i][columnName] = tempTable.Rows[i][columnName];
}
odda.Update(ds);
}
}