File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
JDBC and Relational Databases
Joined: Sep 26, 2003
Apr 19, 2004 23:45:00
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 ')'
Joined: Mar 06, 2001
Apr 19, 2004 23:50:00
Generate the query as a
, then output the string before trying to execute it.
String query = "select level, project_title, student_names, co_supervisor, year from projects_supervised where project_id in("+selected_Id+")"; System.out.println("Executing query: "+query); rs=stmt.executeQuery( query );
This way at least you can paste the code into a db client. It may be the code you are using to generate the
I agree. Here's the link:
subject: update error
Pass value onClick to a function *SOLVED*
Parse and syntax errors
Criteria API vs HQL
sql query returning duplicates
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015