Hey, whadda know, it worked like a charm. Thank you very much!

-----Original Message-----
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 12:38 PM
To: CF-Talk
Subject: Re: Trouble updating value in table


> ODBC Error Code = 37000 (Syntax error or access violation)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Line 3: Incorrect syntax
> near
> '110.00'.
> The error occurred while processing an element with a general identifier
> of
> (CFQUERY), occupying document position (20:1) to (20:54).
> Date/Time: 08/26/02 12:07:20
> Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
> Remote Address: 10.30.20.25
> HTTP Referrer: http://dailynews/DAC/new/Edit.cfm?ID=144

> The value '110.00' is what the user would be entering into that field.
> Below is my cfquery that updates the table. I noticed in the CF5 app
> book by Forta that you have to use CONVERT to make this work, however,
> I can't seem to find any sample code stating how to use it the way I
> need it to be done. Can anyone help me with this?

> <cfquery datasource="FirmDaily" name="UpdateDACTable">
> update DAC
>       set BillingInitials = '#BillingInitials#',
>               StandardRate = CONVERT(#StandardRate#, MONEY),
>               OMRate = CONVERT(#OMRate#, MONEY)
>       where ID = '#ID#'
> </cfquery>

Are you sure you don't have the values for the convert statement reversed?
My experience with MS SQL Server is that the data type preceeds the value in
the arguments... Try this:

StandardRate = CONVERT(MONEY, '#standardRate#'),
OMRate = CONVERT(MONEY, '#OMRate#')


Isaac Dealey
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to