public int ExecuteSql(List<string> listsql)
{
OleDbCommand command = null;
try
{
Open();
command.Connection = conn;
command.Transaction = conn.BeginTransaction();
int i=0;
foreach (string sql in listsql)
{
command.CommandText = sql;
i += command.ExecuteNonQuery();
}
command.Transaction.Commit();
return i;
}
catch (OleDbException e)
{
command.Transaction.Rollback();
foreach (string sql in listsql)
log.Error(sql, e);
}
return 0;
}