"Table doesnot exist " error in oledb

Sep 3 2007 6:03 AM

Iam running a window service in asp.net.For every 5 minutes , the same function will be called.In that function a simple query is executed.but it is throwing "table does not exist".it throws this error rarely.but for the past 2 days offenly i can see this error.while executing the first query itself i can see that error.the result of the first query is not enetered into the log file.instead the exception "table doesnot exist"  is thrown and logged into the log file.The following piece of code

 private OleDbConnection SourceDBConn;

OleDbCommand SourceDBCmd;

OleDbDataReader SourceDBReader = null;

{

SourceDBConn = new OleDbConnection(@"connection string" + ";ChunkSize=60000");

SourceDBConn.Open();

SourceDBCmd = new OleDbCommand();

SourceDBCmd.Connection = SourceDBConn;

SourceDBCmd.CommandText = "SELECT TO_CHAR(SYSDATE,'MM/DD/YYYY HH:MIS AM') FROM DUAL";

SourceDBReader = SourceDBCmd.ExecuteReader();

SourceDBReader.Read();

tempDateTime = SourceDBReader.GetString(0);

SourceDBReader.Close();

 

SourceDBCmd.CommandText =

"SELECT TO_CHAR(MAX(LOAD_END_DATE_TIME),'MM/DD/YYYY HH:MIS AM') FROM A_TESTING_SESSION"

+ " WHERE (LOAD_END_DATE_TIME > TO_DATE('"

+ StartDateTime + "','MM/DD/YYYY HH:MIS AM')) " +

"and ((LOAD_END_DATE_TIME - TO_DATE('" +

StartDateTime + "','MM/DD/YYYY HH:MIS AM'))*24) " +

"< (" + min_pull_interval_minutes + "/60)";

SourceDBReader = SourceDBCmd.ExecuteReader();

SourceDBReader.Read();

tempDateTime = SourceDBReader.GetString(0);

//temp_end_date_time = Convert.ToDateTime(tempDateTime);

temp_end_date_time = DateTime.ParseExact(tempDateTime, "MM/dd/yyyy hh:mms tt", fi);

SourceDBReader.Close();

SourceDBCmd.Dispose();

SourceDBConn.Close();

can u please help me by pointing the error in my code 


Answers (2)