aspose file tools*
The moose likes JDBC and the fly likes [Microsoft][ODBC Microsoft Access Driver] Syntax error in  INSERT INTO statement. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "[Microsoft][ODBC Microsoft Access Driver] Syntax error in  INSERT INTO statement." Watch "[Microsoft][ODBC Microsoft Access Driver] Syntax error in  INSERT INTO statement." New topic
Author

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

Parth Desai
Greenhorn

Joined: Dec 02, 2011
Posts: 1
Hello all,
I am creating e-commerce application getting above error at the end of transaction.please look into following Error and Code for better understanding..Help is appreciated

Code:


Error:

Connected
Width of Screen Size is 1024 pixels
Height of Screen Size is 768 pixels
Connected
cad613d9-0cf7-4371-8ee7-67d6d6dff4d8
2011/12/02 21:29:04
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in
INSERT INTO statement.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6956)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7113)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3109)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:337)
at Recharge.actionPerformed(Recharge.java:350)
at java.awt.Button.processActionEvent(Button.java:409)
at java.awt.Button.processEvent(Button.java:377)
at java.awt.Component.dispatchEventImpl(Component.java:4860)
at java.awt.Component.dispatchEvent(Component.java:4686)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
at java.awt.EventQueue.access$000(EventQueue.java:101)
at java.awt.EventQueue$3.run(EventQueue.java:666)
at java.awt.EventQueue$3.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:680)
at java.awt.EventQueue$4.run(EventQueue.java:678)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18114
    
    8

Hardly surprising. It's quite possible that you missed a quote in that horrible mess of string concatenation. Or possibly there's an extra quote in one of the string
variables. Get rid of the whole mess and use a PreparedStatement with parameters.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
 
Similar Threads
NoClassDefFoundError(unable to open projects)
database access and applet
Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found
problem clicking jbuttons in jtable
how to handle data gotten from CLOBs?