I am getting the following error when i try to run my program. The program is just logging into a database and retrieving some records.I have a login method(to load the database) and a query method that queries the database and gets some records.
the query method is something like this
My main method passes query strings to the query method.
Main Method
I dont know why I am getting the following error.
java.sql.SQLException: ORA-00904: "MAR": invalid identifier
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Exception.java:42)
at java.sql.SQLException.<init>(SQLException.java:43)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(Compiled Code)
at oracle.jdbc.ttc7.Oall7.receive(Compiled Code)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(Compiled Code)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(Compiled Code)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:796)
at Banniinsertch.query(Compiled Code)
at Banniinsertch.main(Compiled Code)
My inputs are movie_id and return_date (20-MAR-02)
When i try to run the query at the SQL prompt it works!!!
I am new to
jdbc, so can anyone pls tell whats causing these errors and how to correct it.
thanks
sagarika