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 to the CF scene
    Join Date
    Apr 2012
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy SQL code for UPDATE in dreamweaver

    <cfquery datasource="b1008321-access">
    UPDATE member
    SET First Name='# Form.first_name#', Last Name='# Form.last_name#', Address='# Form.address#', Town='# Form.Town#', Date Joined='# Form.date_joined#'
    WHERE memberID = #memberID#
    </cfquery>
    <html>
    <body>
    <h1>File Updated</h1></body>
    </html>
    this is my current code for UPDATE statement but wen i view it on the server it shows

    Error Executing Database Query.

    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.

    Plzz help?

  • #2
    Senior Coder
    Join Date
    Apr 2010
    Posts
    1,454
    Thanks
    71
    Thanked 102 Times in 101 Posts
    Please give more information and place your code inside of code tags. Also it's best to post this in the forum that pertains to the language you are coding in.
    Been a sign maker for 7 years. My business:
    American Made Signs

  • #3
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    the aim is for the client(fictious) to update their details
    so i hav created 4 cfm pages
    1st page to search for a member
    2nd page is the results page
    3rd page to update the details for example details such as name is update
    4th page finaaaly update into my database and the message should come up as "member updated" All this pages are put on the server as well.
    My problems are well first of all i can only edit one client out of 10 this code is in the 2nd page and the currrent code is

    <cfquery name = "Recordset1" datasource = "b1008321-access">
    SELECT * FROM Member WHERE first_name LIKE '%seth%'
    </cfquery>
    <html>
    <head><title>Search for Member</title></head>
    <body bgcolor="#FFFFFF">
    <table border="1">
    <tr><td>Member Name</td></tr>
    <cfoutput query = "Recordset1">
    <tr><td><a href = "memberupdate3.cfm?memberID=#memberID#"> #first_name#</a></td></tr>
    </cfoutput>
    </table>
    </body>
    </html>
    i want to be able to search for all the clients not just one
    And the other problem is on the 4th page error message comes up
    Error Executing Database Query.

    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
    And the code i put for tht is

    <cfquery datasource="b1008321-access">
    UPDATE Member
    SET first name='# FORM.first_name#', last name='# FORM.last_name#', address='# FORM.address#', Town='# FORM.Town#', date joined='# FORM.date_joined#'
    WHERE memberID = #memberID#
    </cfquery>
    <html>
    <body>
    <h1>File Updated</h1></body>
    </html>
    Thanks for the reply!


  •  

    Posting Permissions

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