• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Something is wrong in my SQL update

 
Grégoire Berclaz
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have � DB : AlunisDB - table_noms(id_nom(AUTO-INCREMENT), nom(CHAR(20)))
my connection to the DB :
/********************************************/

/*****************************************/
If I do a SELECT there is no probleme but if I do a INSERT INTO a have an error :

my INSERT INTO :
/******************************************/
[ Edited to break apart those long lines in the code block. Scrolling left-right is painful. -ds ]
[ June 29, 2003: Message edited by: Dirk Schreckmann ]
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps this would help (assuming that the problem is the auto-increment column):
 
Grégoire Berclaz
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have still the same error...
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gregoire,
Although I don't use MySQL, I'm guessing that you need to remove the quotation marks from the column names in your SQL statement, like so:

Just out of curiosity, have you read any material on JDBC? (Or are you the trial-and-error type of programmer?)
Hope this solves your problem (the 'insert' one).
Good Luck,
Avi.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic