• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

New at JDBC programming - need help

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic