This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 18541
    
    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: 1624
    
  13

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.
 
 
subject: java sql, what am I doing wrong in my update query?
 
Similar Threads
taking a particular data from a number of lines
[RESOLVED] jasper & iReport multi-reports
Update query is wrong?
error in update query
import data from large csv file. Help.