ORA-00933: SQL command not properly ended
777227Jun 4 2010 — edited Jun 4 2010I am creating an application in VS2008 and i am trying to query an oracle database:
here is my code:
string oracleConnString = "Provider=MSDAORA;Data Source=WHS01_d;Password=;User ID=TSODashboard_Read";
/* Return all Unclosed Changes from Time to Now */
string strSQL = "select * from helpq.changerequest" +
"where daterequested >= to_date('05/01/2010','mm/dd/yyyy') and daterequested < sysdate and actualdone is null;";
OleDbConnection objConnect = new OleDbConnection(oracleConnString);
objConnect.Open();
OleDbCommand objCommand = new OleDbCommand(strSQL, objConnect);
OleDbDataAdapter objAdapter = new OleDbDataAdapter(objCommand);
DataSet objDataSet = new DataSet();
objAdapter.Fill(objDataSet);
string tickets = objDataSet.Tables[0].Rows[0][1].ToString();
Response.Write(tickets);
objConnect.Close();
objConnect.Dispose();
But everytime i run it i get this error: ORA-00933: SQL command not properly ended
I have not written queries in oracle before so i have no idea why it is not working. Any help would be greatly appreciated!
Thanks
Ben