aspose 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
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: 18991
    
    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: 1873
    
  16

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?