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 java sql, what am I doing wrong in my update query? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java sql, what am I doing wrong in my update query?" Watch "java sql, what am I doing wrong in my update query?" New topic
Author

java sql, what am I doing wrong in my update query?

Joe McTigue
Ranch Hand

Joined: Mar 05, 2012
Posts: 52
I keep getting the following error:

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? AND TestDate = ? AND TestTime = ?' at line 1

here's the portion of my code:


etc, etc....
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18121
    
    8

The error message is about your SQL statement. So what you should do first is to look at the SQL statement which the error message is talking about.
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1476
    
  11

Try printing out your SQL statement after you've constructed it, so you can see what the DB is trying to execute.


No more Blub for me, thank you, Vicar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java sql, what am I doing wrong in my update query?
 
Similar Threads
error in update query
taking a particular data from a number of lines
Update query is wrong?
[RESOLVED] jasper & iReport multi-reports
import data from large csv file. Help.