HI I am writing a sample application to insert and retrive datetime format . The Insert i did was sucessfull but dont know why it fails when i query to retrieve it . .
My insert goes like this..
string SqlQuery = "INSERT into BenchMarking Values (" + i + " , 'XXXX','This is a testing','M','2010-05-05 05:06:01')";
sqlWrapper.ExecuteNonQuery(SqlQuery);
but when i query them its not returning me anything ...
retrive query
string sqlQuery = "select Id from BenchMarking where Datetime = '2010-05-05'";
reader = sqlWrapper.ExecuteQuery(sqlQuery);
anyone knows why this is happening?