aspose file tools*
The moose likes JDBC and the fly likes Syntax error in INSERT statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Syntax error in INSERT statement" Watch "Syntax error in INSERT statement" New topic
Author

Syntax error in INSERT statement

K Vidhyakar
Ranch Hand

Joined: Jul 10, 2005
Posts: 68


im getting syn
"java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driv
er] Syntax error in INSERT INTO statement."

while running the above. code. any body help me with this problem
[ July 21, 2006: Message edited by: K Vidhyakar ]
Zip Ped
Ranch Hand

Joined: Jul 26, 2005
Posts: 336
Check your field data types (such as eid,timeIn, timeOut). Are all your field of the type Text in your table?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

"Date" is a reserved word in MS Access (which I guess you may be using) and probably in other databases too. Changing the column name to something more precise would, as a side effect, improve your database design.
K Vidhyakar
Ranch Hand

Joined: Jul 10, 2005
Posts: 68
they i changed the field name date to edate. now its working.
thanks a lot friends.
amit bhadre
Ranch Hand

Joined: Jan 23, 2006
Posts: 124
check the DNS name which should be created as company while connecting to MS sql server.


Thanks advance who ever answers this question.


regards
amit bhadre
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Syntax error in INSERT statement