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 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2005
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Syntax error in UPDATE statement

    I'm building a massive employee database system in asp.net. I'm currently testing it and I got the error in the Title when I tried to run this query. But when I tried running it directly in my database rather than through my page it worked just fine. Any ideas?

    Code:
    update employees set fName='pizza', lName='head', rank='peon', payType='never', payRate=0, address='pizza hut', city='anytown', state='DC', zip=55555, pPhone='(555) 555-5555', sPhone='(555) 555-6666', email='pizzahead@pizzahut.com', current=TRUE where id=1
    Brett Bretterson

  • #2
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    You might want to try putting quotes around true, and square brackets around current, although i'm not sure in access, in Sql Server current is a reserved word:
    [current] = 'TRUE'

    Good luck;


  •  

    Posting Permissions

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