SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Location
    Colorado
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Basic Update SQL statement not working. (MS Access)

    I am getting a syntax error when I try to run this SQL statement:

    Code:
    UPDATE users SET Password = 'newpass' WHERE Username = 'Graham';
    I commented out the line that executes this in order to create this thread so I know that this is exactly what would have run. The data type for both fields is text. When I take this statement and use it to create a query in Access it works just fine. I am clearly missing something very basic. I have gone over each field letter by letter to confirm that this problem is not due to a typo. Any ideas? Thanks in advance to anyone willing to help.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,276
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    maybe try [Password] instead of Password, as it might be a reserved word (i'm too lazy to look it up)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Location
    Colorado
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking

    Thank you! That was it! I can guarantee you I would never have figured that out on my own. Many, many thanks sir or madam.


Tags for this Thread

Bookmarks

Posting Permissions

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