• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems with java and mysql error: 1064

 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have been struggling with the following java code for a day. I ALWAYS get the following error code : 1064 and I just can't figure out why. I am trying to insert data into a mysql table.
Can anyone please help?
Thanks in advance,
Julien.



[Removed sensitive data - Dave]
[ August 04, 2008: Message edited by: David O'Meara ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1064 is a query syntax error I think? Your SQL statement is big and complex to build. I'd recommend you swap to using a PreparedStatement, make things easier for yourself.
 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Paul!
My code was not very clean. I changed to a prepared statement and it now works.
Julien.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic