Any time dude. Hit us when you have more problems. 

......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-----Original Message-----
From: Stephen Power [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 14, 2007 1:45 PM
To: CF-Newbie
Subject: Re: SQL UPDATE Statement error

It works! I placed the brackets around Usage, and that did the trick.
Usage must be a reserved word or something of the sort like you said.
Thank you so much for your help. Here's a copy of my final code, in case
anyone else is reading this with a similar problem:
<cftry>
<cfquery name="update" datasource="Web2" dbtype="oledb">
        UPDATE DiskUsage
        SET AmountFull=<cfqueryparam value="#form.percentfull#"
cfsqltype="CF_SQL_VARCHAR" />, 
        [Usage]=<cfqueryparam value="#form.usage#"
cfsqltype="CF_SQL_VARCHAR" />
        WHERE Drive=<cfqueryparam value="#form.drive#"
cfsqltype="CF_SQL_VARCHAR" /> </cfquery> <cfcatch type="database">
        <cfdump var="#cfcatch.message#"><br>
        <cfdump var="#cfcatch.detail#"><br>
</cfcatch>
</cftry>

Thank you so much for your help, it is truly appreciated. I will
definetely be coming back here in the future when I run into problems of
this nature.
Take care,
Tarvalon

>What happens if you keep in the Usage line, but take out the value from

>the form:
>
>[Usage]='' 
>
>Also put the [] in... If this works then it's either a reserved words 
>AND / OR a funky form value.
>
>
>.....................
>Ben Nadel
>Certified Advanced ColdFusion MX7 Developer www.bennadel.com
> 
>Need ColdFusion Help?
>www.bennadel.com/ask-ben/
>
>-----Original Message-----
>From: Stephen Power [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, February 14, 2007 1:18 PM
>To: CF-Newbie
>Subject: Re: SQL UPDATE Statement error
>
>I apologize for the double post (again), but I recently had a 
>breakthrough. I can now update the AmountFull column without any 
>problems. My current code is:
><cfquery name="update" datasource="Web2" dbtype="oledb"> 
>       UPDATE DiskUsage
>       SET AmountFull='#form.percentfull#', Usage='#form.usage#'
>       WHERE Drive='#form.drive#'
></cfquery>
>I still get an error message stating, "Syntax error in UPDATE 
>statement." every time I run this query, but I now know it is due to 
>the Usage='#form.usage#'. If I remove that line, everything runs
smoothly.
>Any thoughts?
>Tarvalon
>
>> Sorry for the delay, I've been out of the office since Monday. Thanks

>> again for all the help you've given me so far, it's really
>appreciated.
>> 
>> Back on topic, I changed the line to add in the preservesinglequotes,

>> and the error message changed to: "Syntax error (missing operator) in

>> query expression 'Drive = C:'."
>> The missing single quote before the C: is now gone, but there is 
>> still



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2558
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to