这个函数有问题吗
public void UpdateExcel(string strExcel)
{try
{
OleDbConnection conn = new OleDbConnection(connectionString);
conn.Open();//打开数据库
OleDbCommand cmd = new OleDbCommand(strExcel, conn);
int row = cmd.ExecuteNonQuery();//如果更新数据row>0
if (row > 0)
{
update = true;
conn.Close();
//return update;
}
}
catch
{
}
}