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 > an error. It's finally generating something a little more detailed, > however (missing operator). I'm not sure exactly what I'm missing, > though, any ideas? > Tarvalon > > >Hmmm, interesting. The single quotes would be causing an error, but > they > >might just be part of the error message output. That is why I wanted > to > >you use CFQueryParam (which handles this usually). However, as > >CFQueryParam did not help the problem, try the > PreserveSingleQuotes(): > > > >SET > > Drive = #PreserveSingleQuotes( FORM.drive )# > > > > > > > >..................... > >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: Monday, February 12, 2007 2:04 PM > >To: CF-Newbie > >Subject: Re: SQL UPDATE Statement error > > > >We might be getting somewhere now. After I removed the > >AmountFull='#form.percentfull#' statement, nothing changed. However, > >after I removed Usage='#form.usage#', the error detail in the > <cfcatch> > >tag changed to read: "Syntax error in string in query expression > >'Drive='C:'." (C: is the name being passed in on the form via a > hidden > >input and is not changeable, and C: is the value in the database > under > >the Drive field as well). Is the single ' (quote) before Drive > causing > >an error? This quote is not listed anywhere in my code, but it is > >showing up in that error message detail. >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:2556 Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
