Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Feb 2003
    Location
    South Africa
    Posts
    251
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SQL UPDATE problems...

    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:
    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:
    Code:
    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...

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    Regular Coder
    Join Date
    Feb 2003
    Location
    South Africa
    Posts
    251
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, don't i feel stupid? I guess password is another one of those reserved key words... Dope!

    Thanx a ton


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •