>- see footer for list info -<
The CONVERT function?

Sorry, that was too easy :OD

Check BOL, it'll have the syntax and the options for any masks or formats.

Ade

-----Original Message-----
From: Paul Swingewood [mailto:[EMAIL PROTECTED] 
Sent: 12 January 2005 16:01
To: [email protected]
Subject: [CF-Dev] Money!


>- see footer for list info -<
I have a field in an SQL database of type MONEY

I have a form that asks for a selling price.

<cfinput type = "text" name = "SellingPrice" required = "Yes">

I then have a query to update the database

INSERT INTO tblPropertyDetails
                                (NoBedroomsIDFK,
                                PropertyTypeIDFK,
                                PropertyLocationIDFK,
                                RoadName,
                                Picture,
                                Description1,
                                Description2,
                                Description3,
                                Description4,
                                Description5,
                                Description6,
                                SellingPrice,
                                PostCode,
                                PDFDetails)
                        VALUES
                                ('#form.Select_Bedrooms#',
                                '#form.Select_Type#',
                                '#form.Select_Location#',
                                '#trim(form.RoadName)#',
                                '#smallpic#',
                                '#trim(form.Description1)#',
                                '#trim(form.Description2)#',
                                '#trim(form.Description3)#',
                                '#trim(form.Description4)#',
                                '#trim(form.Description5)#',
                                '#trim(form.Description6)#',
                                '#form.SellingPrice#',
                                '#trim(PostCode)#',
                                '#Details#')

I get the following error message.


Disallowed implicit conversion from data type varchar to data type money, 
table &apos;Taylor Rose.dbo.tblPropertyDetails&apos;, column 
&apos;SellingPrice&apos;. Use the CONVERT function to run this query.

What do I need to do to make the SellingPrice from the form into the correct

datatype ..?

Regards - Paul


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help 
>-<
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to