Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00933: SQL command not properly ended

777227Jun 4 2010 — edited Jun 4 2010
I 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
This post has been answered by SomeoneElse on Jun 4 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 2 2010
Added on Jun 4 2010
4 comments
1,882 views