SQL command not properly ended


  • I am working in visual studio 2008 with C# and, the company i work for has SQL and oracle databases. The SQL databases have all the proper queries and are working great, but now i am trying to connect to the 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);
       OleDbCommand objCommand = new OleDbCommand(strSQL, objConnect);
       OleDbDataAdapter objAdapter = new OleDbDataAdapter(objCommand);
       DataSet objDataSet = new DataSet();
       string tickets = objDataSet.Tables[0].Rows[0][1].ToString();

    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!



    • Moved by Edwer Fang Monday, June 07, 2010 7:48 AM (From:Visual Studio Database Development Tools (Formerly "Database Edition Forum"))
    Friday, June 04, 2010 2:34 PM

All replies

  • Hello Ben,

    You can post your issue on corresponding language forum or PL/SQL Forum so you can get better and quicker response as this forum here is for the database development tools of visual studio.

    Thanks for your understanding.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at
    Monday, June 07, 2010 7:47 AM