Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
murpg #1
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 Document 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> </th>
</tr>
<tr>
<th scope="col" class="normal">Name: </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>"> </th>
</tr>
<tr>
<th scope="row" class="normal">Scroller Text: </th>
<td align="left" class="normal"><textarea name="Text" cols="70" rows="15"
wrap="virtual"><cfoutput>#Recordset1.Text#</cfoutput></textarea> </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>> 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
-
Syntax error in UPDATE statement.
ok i have an update form that i created it is for the admin of the site to add/edit user account info for memebers to login. the form adds or edits... -
Update Statement error
Hello, Ii'm receiving the syntax error listed below for my update statement. Doesn't anyone have any ideas? Syntax error or access... -
Syntax Error Update Statement
Can someone tell me what's wrong with this code? I need help. Thanks! It is an update page. FIRST PAGE: LOGIN CHECK <!--- Filename: ... -
Syntax error in UPDATE statement- asp/jscript
Hi All! I have the following two methods in an asp/jscript page - my problem is that without the update statement there is no error, but with the... -
Syntax Error In Update Statement
I'm having a problem getting one piece of code to work on my app. It's a simple password change. For some reason, I've been getting the following... -
Mountain Lover #2
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]info@NOSPAMINGrecfusion.com[/email]
Mountain Lover Guest
-



Reply With Quote

