File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL syntax error

 
Layne Lund
Ranch Hand
Posts: 3061
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting a SQL syntax error when I try to execute an INSERT...INTO command via JDBC. Unfortunately, the message is not very helpful! Maybe I'm just spoiled by the nice messages that Sun's Java compiler gives for my Java code. Anyway, here is the code that causes the error:



And here is the stack trace for the exception:



The SQLUtil class is a nice little utility that takes care of a lot of the complexities of JDBC for me. Also it makes commonly used code very reusable. I won't post it here unless I need. Most of the methods I use here are delegated directly to a PreparedStatement.

Any ideas what the problem is with my SQL statement?

I will greatly appreciate any help.

Layne
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64194
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And like Java code, be sure to balance your parentheses.
[ June 08, 2005: Message edited by: Bear Bibeault ]
 
Layne Lund
Ranch Hand
Posts: 3061
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
And like Java code, be sure to balance your parentheses.

[ June 08, 2005: Message edited by: Bear Bibeault ]




Is that all it is! *mutters* Why can't the error message say so! I nice little "expected ')'" shouldn't be too difficult!

Thanks, Bear!!! Once I add a paren, I hope it works.

Layne
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic