jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases 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 and Relational Databases
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
Sheriff

Joined: Oct 14, 2005
Posts: 19728
    
  10

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: 2205
    
  22

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.
 
Have you checked out Aspose?
 
subject: java sql, what am I doing wrong in my update query?
 
It's not a secret anymore!