...

View Full Version : SQL UPDATE problems...



david7777
02-27-2003, 08:05 AM
I have managed to write all the code for an administrative section of a site in ADO and ASP but i have this problem in 2 places now - I can update a record in a table perfectly, unless i try update a certain field. ie- I have the code:


UPDATE products SET short_desc='Wild Blue', price=314.45, prod_group=3, discount=0, weight=0 WHERE id=1;

That works finem but as soon as i add this one the size field for update, like this:


UPDATE products SET short_desc='Wild Blue', price=314.45, prod_group=3, discount=0, weight=0, size='800' WHERE id=1;

Now suddenly there is a problem - I get "Syntax error in UPDATE statement." Why? I cant see anything wrong with the code...

The size field is a char field of length 50. I have even tried updating the fields in the order they appear, but still no luck.

Can anyone see the problem? This has happened to me with 2 of my tables now - only one field has the problem - all others are ok...

raf
02-27-2003, 01:49 PM
size is a reserved word in jet sql

i've posted a list of all reserved words here a faw week ago. if you want it, do a search.

david7777
02-27-2003, 01:54 PM
Well, don't i feel stupid? I guess password is another one of those reserved key words... Dope!:o

Thanx a ton



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum