Update #Recordset1.ScrollerName# 
Name:   
Scroller Text:   
Display Add: Yes: checked>  No: checked>
[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => murpg [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> Error executing a cfquery update statement. PLEASE HELP - Coldfusion - Advanced Techniques

Error executing a cfquery update statement. PLEASE HELP - Coldfusion - Advanced Techniques

I have been over and over this. I am trying to update a simple table. I took this script from the same server using a different DSN. I keep getting this error. Error Executing Database Query. [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement. Here is the code. <cfset CurrentPage=GetFileFromPath(GetTemplatePath())> <cfif IsDefined("FORM.MM_UpdateRecord") AND FORM.MM_UpdateRecord EQ "form1"> <cfquery datasource="#application.ds#"> UPDATE scrolltable SET ScrollerName= <cfif IsDefined("FORM.scrollername") AND #FORM.scrollername# NEQ ""> '#FORM.scrollername#' <cfelse> NULL </cfif> , Text= <cfif IsDefined("FORM.Text") AND #FORM.Text# NEQ ""> '#FORM.Text#' <cfelse> NULL </cfif> , Display= <cfif IsDefined("FORM.Display") AND #FORM.Display# NEQ ""> #FORM.Display# <cfelse> NULL </cfif> ...

  1. #1

    Default Error executing a cfquery update statement. PLEASE HELP

    I have been over and over this. I am trying to update a simple table. I took
    this script from the same server using a different DSN. I keep getting this
    error.

    Error Executing Database Query.
    [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access
    Driver] Syntax error in UPDATE statement.

    Here is the code.


    <cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
    <cfif IsDefined("FORM.MM_UpdateRecord") AND FORM.MM_UpdateRecord EQ "form1">

    <cfquery datasource="#application.ds#">
    UPDATE scrolltable SET ScrollerName=
    <cfif IsDefined("FORM.scrollername") AND #FORM.scrollername# NEQ "">
    '#FORM.scrollername#'
    <cfelse>
    NULL
    </cfif>
    , Text=
    <cfif IsDefined("FORM.Text") AND #FORM.Text# NEQ "">
    '#FORM.Text#'
    <cfelse>
    NULL
    </cfif>
    , Display=
    <cfif IsDefined("FORM.Display") AND #FORM.Display# NEQ "">
    #FORM.Display#
    <cfelse>
    NULL
    </cfif>
    WHERE CarID=#FORM.CarID#
    </cfquery>
    <cflocation url="index.cfm">
    </cfif>
    <cfif NOT IsDefined("FORM.MM_UpdateRecord")>
    <cfquery name="Recordset1" datasource="#application.ds#">
    SELECT *
    FROM scrolltable
    WHERE CarID = #url.CallerID#
    </cfquery>
    </cfif>
    <!--- Set Doent Title to be picked up in _header.html --->
    <CFSET title = "Update #Recordset1.ScrollerName#">
    <!--- Include style sheet --->
    <CFINCLUDE TEMPLATE="../_header.html">
    <form action="<cfoutput>#CurrentPage#</cfoutput>" name="form1" method="POST">
    <table wCarIDth="100%" border="1" BORDERCOLOR="#DDDDCC">
    <tr>
    <th colspan="2" align="left" bgcolor="#F1F1EB" class="normal"
    scope="col">Update <cfoutput>#Recordset1.ScrollerName#</cfoutput>&nbsp;</th>
    </tr>
    <tr>
    <th scope="col" class="normal">Name:&nbsp;</th>
    <th align="left" class="normal" scope="col"><input name="CarID"
    type="hidden" value="<cfoutput>#Recordset1.CarID#</cfoutput>"><input
    name="scrollername" type="text"
    value="<cfoutput>#Recordset1.ScrollerName#</cfoutput>">&nbsp;</th>
    </tr>
    <tr>
    <th scope="row" class="normal">Scroller Text:&nbsp;</th>
    <td align="left" class="normal"><textarea name="Text" cols="70" rows="15"
    wrap="virtual"><cfoutput>#Recordset1.Text#</cfoutput></textarea>&nbsp;</td>
    </tr>
    <tr>
    <th scope="row" class="normal">Display Add:</th>
    <td align="left" class="normal">Yes:
    <input name="Display" type="radio" value="0" <cfif recordset1.Display EQ
    0>checked<cfelse></cfif>>&nbsp; No: <input name="Display" type="radio"
    value="1" <cfif recordset1.Display EQ 1>checked<cfelse></cfif>></td>
    </tr>
    <tr>
    <th scope="row"><input name="" type="submit"></th>
    <td><input name="" type="reset"></td>
    </tr>
    </table>

    <input type="hidden" name="MM_UpdateRecord" value="form1">
    </form>
    <!--- Include footer --->
    <CFINCLUDE TEMPLATE="../_footer.html">

    murpg Guest

  2. #2

    Default Re: Error executing a cfquery update statement. PLEASE HELP

    "text" is a reserved word try using brackets around it....[Text]=
    HTH

    --
    Tim Carley
    [url]www.recfusion.com[/url]
    [email]infoNOSPAMINGrecfusion.com[/email]
    Mountain Lover Guest

  3. #3

    Default Re: Error executing a cfquery update statement. PLEASEHELP

    That is the answer.
    murpg Guest

Similar Threads

  1. Syntax error in UPDATE statement.
    By chill84 in forum Coldfusion Database Access
    Replies: 9
    Last Post: November 9th, 03:09 PM
  2. Update Statement error
    By ldebono in forum Coldfusion Database Access
    Replies: 2
    Last Post: March 22nd, 06:25 PM
  3. Syntax Error Update Statement
    By Heather939 in forum Macromedia ColdFusion
    Replies: 1
    Last Post: May 13th, 03:10 AM
  4. Syntax error in UPDATE statement- asp/jscript
    By Robert Mark Bram in forum ASP
    Replies: 3
    Last Post: October 21st, 07:05 PM
  5. Syntax Error In Update Statement
    By MDW in forum ASP Database
    Replies: 10
    Last Post: October 13th, 10:07 PM

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
  •