did you try dollarFormat?
----- Original Message ----- From: "Venable, John" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Saturday, June 14, 2003 3:00 PM Subject: Money Datatype Problem > Maybe someone can tell me what I'm doing wrong. I have a field in SQL Server > 2K that is money datatype. I am building a submission form to populate that > field and I keep getting errors about type. This is what my field insert > looks like: > > <cfif > len(trim(form.HourlyWage))>'#trim(numberFormat(form.HourlyWage,"999.99"))#'< > cfelse>NULL</cfif> > > Which throws this error: > > Disallowed implicit conversion from data type varchar to data type money, > table 'JobTech.dbo.Enrollments', column 'HourlyWage'. Use the CONVERT > function to run this query. > > Even though in debugging, the value is 10.00 which seems pretty money-like > to me. > > SO I tried this: > > <cfif > len(trim(form.HourlyWageBefore))>'CONVERT(money,#trim(numberFormat(form.Hour > lyWageBefore,"999.99"))#)'<cfelse>NULL</cfif> > > Same error. Then I tried this: > > <cfif > len(trim(form.HourlyWageBefore))>'cast(#trim(numberFormat(form.HourlyWageBef > ore,"999.99"))# AS MONEY)'<cfelse>NULL</cfif> > > Same error. > > What am I doing wrong? I thought CF was typeless. > > Thanks > > John Venable > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq 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 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

