Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
murpg #1
Help me I have been working all day trying to get thisUpdate Query to work
I am getting this error when I try and run this query update.
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft
Access Driver] Syntax error in UPDATE statement.
The error occurred in
E:\Domains\theautogalleryva.com\wwwroot\MyCFSite\h tml\scroller\update_scroller_a
ction.cfm: line 23
21 : NULL
22 : </cfif>
23 : WHERE CarID = #FORM.CarID#
24 : </cfquery>
25 : <cflocation url="index.cfm">
--------------------------------------------------------------------------------
SQL UPDATE scrolltable SET ScrollerName = 'Cross Lander' , Text = 'The
Crosslander 2005 Coming Soon' , Display = 1 WHERE CarID = 1
DATASOURCE AGMyCFSite
VENDORERRORCODE -3503
SQLSTATE 42000
Here is my 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>
<form action="<cfoutput>#CurrentPage#</cfoutput>" name="form1" method="POST">
<table width="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>
murpg Guest
-
Acces Query not working
I wrote this query and thought it should work but it doest, any ideas. Thanx in Advance Rubeel <cfquery name="insert_faculty"... -
PHP Update query not working
Hello, I'm using a standard update query and getting an error message. Here is the code: if ((isset($HTTP_POST_VARS)) && ($HTTP_POST_VARS ==... -
Query not working
My providor is running cf6.1. I have a query that should work, but doesn't. It's pretty standard and i am horribly confused. Essentially, it states:... -
sum in query not working. Help please.....
here is my query. the 3rd sum (totcost) does not ouput anything. i cant seem to figure it out. what am i doing wrong? <CFQUERY name='GetLegal'... -
recordset query not working
hello, im using asp and dreamweavers automated features. the following query works select * from table where dateexp >= now so expired... -
The ScareCrow #2
Re: Help me I have been working all day trying to getthis Update Query to work
Text and possibly Display are reserved words and you should not have a column
with these names
either rename the columns or enclose in square brakets
UPDATE scrolltable
SET ScrollerName = 'Cross Lander'
, [Text] = 'The Crosslander 2005 Coming Soon'
, [Display] = 1
WHERE CarID = 1
Ken
The ScareCrow Guest



Reply With Quote

