File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes New at JDBC programming - need help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "New at JDBC programming - need help" Watch "New at JDBC programming - need help" New topic
Author

New at JDBC programming - need help

Joao Freitas
Greenhorn

Joined: Dec 05, 2012
Posts: 1
Hello to all,

I'm a new member and I have almost no experience in Java and JDBC, I've only programmed in C. I have an assignment for my Database course and I've been struggling for some days with a problem I can't fix.

After running the code in the Eclipse IDE I get the error ORA-00936: missing expression tips. I've used the debugger and I guess the problem is in this part of the code:



The idea is to use prepared statements to then pass a parameter to the query at the execution time. This parameter is a number which correspondes to the CourseID of a given course in the COURSE table. Can you spot any problem?


Thank you very much in advance.

Regards,

Joao Freitas
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2274
    
  28

Please wrap your code in code tags to make it easier to read

Your SQL is wrong. It should be



You have extra commas

ETA: It's helpful to run your queries through database before putting them in code. Usually I use SQL developer to build and test my queries before dropping them in code. It gives you the line and col number where your SQL is wrong
 
wood burning stoves
 
subject: New at JDBC programming - need help
 
Similar Threads
cannot insert datetime type
problem while reading data from excel sheet
NULL POINTER eXCEPTION
Trying to grab the last record.
Trying to grab the last record.