Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Exception

 
shuzo monsoon
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all. I can't figure out what is goin wrong with an INSERT SQL query I am using in a JSP page. Here is the code -

But when I attempt to execute this query, I get an SQLException error saying : Syntax error in INSERT INTO statement.
I have also tried using a prepared statement but I get the same error.
Can anyone help?
Thanks!
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Numerical data should not be wrapped in ' '.
 
fox tie
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sometimes you must add database name before the table's name between a dot.
for example: book.order
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64688
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sometimes you must add database name before the table's name between a dot.

Though this is clearly not one of those times.
 
Jon Egan
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are there other inserts working for this table? possible that the table name itself is causing the problem, since ORDER is [part of] an ANSI SQL keyword (ORDER BY)?
I remember one time I was working with a field which held a description, and we were getting errors until we renamed it to "descr" instead of "desc" :roll:
Hope this is the problem, because it seems like it would be simple to fix...
-- Jon
 
Drew Dambrell
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you could use PL/SQL worksheet or someother interface app to test your query b4 you actually add it in your code
or something along those lines
[ March 31, 2004: Message edited by: Dru InHeaven() ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic