Syntax error in INSERT INTO statement

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Dec 2007
Posts: 1,718
Reputation: javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all 
Solved Threads: 230
Featured Poster
javaAddict's Avatar
javaAddict javaAddict is offline Offline
Posting Virtuoso

Re: Syntax error in INSERT INTO statement

 
0
  #11
Feb 18th, 2008
I would suggest copying the query in an sql editor and try to run it by replacing only the '?' with values.
Check out my New Bike at my Public Profile at the "About Me" tab
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 32
Reputation: eddy556 is an unknown quantity at this point 
Solved Threads: 0
eddy556 eddy556 is offline Offline
Light Poster

Re: Syntax error in INSERT INTO statement

 
0
  #12
Feb 18th, 2008
After all that! All I had to do was put square brackets around date because it is a reserved word! I was ready to hit the computer ;-)

Thanks for your help guys
Last edited by eddy556; Feb 18th, 2008 at 2:11 pm.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,467
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 267
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: Syntax error in INSERT INTO statement

 
0
  #13
Feb 18th, 2008
Read reply #5. I had already told you to change the name of the field, again (after having changed it from timestamp). You are much, much, much better off not using reserved words in table or column names. Even if there is a "workaround" to allow it. It is, at the very least, a very bad practice with nasty side-effects (as you have just seen).
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 5064 | Replies: 12
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC