- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
public bool SqlTest(string sql)
{
try
{
if (Utils.ExecuteScalar(sql).ToString() != "8") throw new Exception("Bad result from DB!");
}
catch (Exception ex)
{
LogService.WriteStd("CheckDBRun1: " + sql, ex);
Utils.SQLServerRun();
try
{
if (Utils.ExecuteScalar(sql).ToString() != "8") throw new Exception("Bad result from DB!");
}
catch (Exception ex2)
{
LogService.WriteStd("CheckDBRun2: " + sql, ex2);
return false;
}
}
return true;
}