Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java mySql update statement  RSS feed

 
Giuseppa Cefalu
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I get the following error in my code: SQL Error! Can not perform SQL update. 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 UPDATEDEMSET......
This is the updateLine[y]. What am I doing wrong? Thank you.



 
Paul Clapham
Sheriff
Posts: 22199
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The very first thing you should do when you are told there is an error in your SQL is to look at that SQL.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36622
474
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also look at the whitespace (or lack thereof) in your query.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!