jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes Java sqlexception definition Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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 much...my wrong,sorry!
I agree. Here's the link: http://aspose.com/file-tools
subject: Java sqlexception definition
jQuery in Action, 3rd edition