Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Syntax error in INSERT statement

 
K Vidhyakar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check your field data types (such as eid,timeIn, timeOut). Are all your field of the type Text in your table?
 
Paul Clapham
Sheriff
Pie
Posts: 20758
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
they i changed the field name date to edate. now its working.
thanks a lot friends.
 
amit bhadre
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check the DNS name which should be created as company while connecting to MS sql server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic