aspose file tools
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 The Software Craftsman this week in the Agile 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.
Have you tried LearnNowOnline?
subject: Error in Query