This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Java sqlexception definition" Watch "Java sqlexception definition" New topic

Java sqlexception definition

Janardan Kelkar
Ranch Hand

Joined: May 05, 2008
Posts: 72

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

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: 72

thank you very wrong,sorry!
I agree. Here's the link:
subject: Java sqlexception definition
Similar Threads
java sqlexception
Error in insert into
creating virtual tables
code working in Appletviewer but not browser
Error while accessing MSAccess in JSP