Bob: The #usage#, #percentfull#, and #drive# variables are all form variables 
being passed in.

Mr. Nadel: Adding the <cfparam> tags didn't fix the issue. It did produce a 
slightly different SQL statement, however, in that the SQL statement itself now 
has values of <param1>, <param2>, and <param3> for the values for 
#percentfull#, #usage#, and #drive#.

Mr. Weidler: The error message I am receiving is: "Error Executing Database 
Query."
The error detail is: "Syntax error in UPDATE statement."
I found these using a <cftry> and <cfcatch> setup and then dumping 
<cfdump var="#cfcatch.message#">
<cfdump var="#cfcatch.detail#">
If there is another way to dump out error messages using the <cferror> tag, I 
would love to know how, especially if it produces better results than the 
<cftry>, <cfcatch> format I currently use.

Thanks for all the help everyone, I really appreciate it.

Tarvalon

>Just a shot in the dark at first glance, but is your "#usage#"  being handed
>via a form variable also or is it being hardcoded somewhere before the
>statement?
>
>Bob
>
>-----Original Message-----
>From: Stephen Power [mailto:[EMAIL PROTECTED] 
>Sent: Monday, February 12, 2007 12:40 PM
>To: CF-Newbie
>Subject: SQL UPDATE Statement error
>
>Hey everyone,
>I've been working with this (extremely basic) UPDATE statement for quite
>some time now, and I can't seem to find the problem. Here's the code:
>
><cfquery name="update" datasource="Web2" dbtype="oledb">
>       UPDATE DiskUsage
>       SET Full='#form.percentfull#', Usage='#usage#'
>       WHERE Drive='#form.drive#'
></cfquery>
>
>I've verified that the spelling of my datasource, table name, field names
>and form names are all correct. Whenever I attempt to run the query, I get
>the "Syntax error in UPDATE statement" error message, with the first line
>highlighted. I've tried running the query directly in Access, and everything
>works just fine. As far as I can tell, I am not using any reserved words,
>either. In the database, the Full, Usage, and Drive fields are all set to a
>Data Type of text with a Field Size of 50. If you could give me some help, I
>would greatly appreciate it.
>Thanks,
>Tarvalon

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:2528
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