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
    New Coder
    Join Date
    Apr 2006
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile SQL error any help really appreciated!

    I have a SQL error I cannot see and was wondering if u can see it?;

    Code:
    ' build the SQL UPDATE "command string"
    strCmdTxtMem="UPDATE link SET link_text='" & request("linkText") & "',"
    strCmdTxtMem=strCmdTxtMem & " link_url='" & request("linkUrl") & "',"
    strCmdTxtMem=strCmdTxtMem & " link_title='" & request("linkTitle") & "',"
    strCmdTxtMem=strCmdTxtMem & " WHERE link_id=" & request("linkId")
    I outptted the sql and get this error message;

    UPDATE link SET link_text='Blue Anvil', link_url='http://www.blue-anvil.com/', link_title='go to blue anvil design', WHERE link_id=4
    Microsoft JET Database Engine error '80040e14'
    Syntax error in UPDATE statement.
    /editmember_process_basic.asp, line 31


    i really appreciate any help, Anthony

  • #2
    Regular Coder anarchy3200's Avatar
    Join Date
    Mar 2003
    Location
    England
    Posts
    261
    Thanks
    0
    Thanked 1 Time in 1 Post
    You dont need the comma after the last item, it should output:
    UPDATE link SET link_text='Blue Anvil', link_url='http://www.blue-anvil.com/', link_title='go to blue anvil design' WHERE link_id=4
    So:
    Code:
    ' build the SQL UPDATE "command string"
    strCmdTxtMem="UPDATE link SET link_text='" & request("linkText") & "',"
    strCmdTxtMem=strCmdTxtMem & " link_url='" & request("linkUrl") & "',"
    strCmdTxtMem=strCmdTxtMem & " link_title='" & request("linkTitle") & "'"
    strCmdTxtMem=strCmdTxtMem & " WHERE link_id=" & request("linkId")
    Mike

  • #3
    New Coder
    Join Date
    Apr 2006
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile sorted thanks

    Great!, Thanks for the help, its sorted now!


  •  

    Posting Permissions

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