File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes update error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "update error" Watch "update error" New topic

update error

jyotsana dang
Ranch Hand

Joined: Sep 26, 2003
Posts: 135
i wrote a query for updation but it gives a syntax error.
rs=stmt.executeQuery("select level, project_title, student_names, co_supervisor, year from projects_supervised where project_id in("+selected_Id+")");
incorrect syntax near ')'
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Generate the query as a string, then output the string before trying to execute it.

This way at least you can paste the code into a db client. It may be the code you are using to generate the selected_Id is incorrect.
I agree. Here's the link:
subject: update error
jQuery in Action, 3rd edition