This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Error in Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Error in Query" Watch "Error in Query" New topic

Error in Query

M. Imran

Joined: Feb 12, 2002
Posts: 21
Can any one tell what is problem in the following query, when I run this in a MS Access 2000 db from a java application it give error 'Syntax error in INSERT INTO statement' where date, desc, and memo fields are text type while other all are numeric.
query is : INSERT INTO Assets (transnum, acc_number, date, desc, memo, debit, credit, quantity, rate) VALUES ('10', '10', 'x', 'x', 'x', '10', '10', '10', '10' )
I will be very grateful to you,
Thank you,
vidya archana
Ranch Hand

Joined: Oct 29, 2002
Posts: 36
u dont have to use quotes for numerical values.
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

I'm moving this to a more appropriate forum than Swing/JFC/AWT, since this question has nothing to do with building GUIs...

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: Error in Query
jQuery in Action, 3rd edition