• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Joe McTigue
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20980
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2407
32
Linux Oracle Postgres Database Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try printing out your SQL statement after you've constructed it, so you can see what the DB is trying to execute.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic