This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JDBC and the fly likes Java sqlexception definition Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Java sqlexception definition" Watch "Java sqlexception definition" New topic
Author

Java sqlexception definition

Janardan Kelkar
Ranch Hand

Joined: May 05, 2008
Posts: 69

i seem to be ghetting an exception when trying to insert in a database defined in ms access.
parameters are as follows:
driver is sun.jdbc.odbc.JdbcOdbcDriver;
error code is: -3506
sql state is :37000
message is : [Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.

my query is:
"select * from Order"

java 1.5


When the compiler's not happy, ain't nobody happy.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Order is a SQL keyword. If you have an entity called order, rename it. If you can't rename it, I think the Access escape character is brakets, so you could try:


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Janardan Kelkar
Ranch Hand

Joined: May 05, 2008
Posts: 69

thank you very much...my wrong,sorry!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Java sqlexception definition
 
Similar Threads
Error while accessing MSAccess in JSP
Error in insert into
code working in Appletviewer but not browser
java sqlexception
creating virtual tables