We need a little more insight into the issue likely a small snippet of your
insert / update code, but I'd be willing to bet that something like this
should work:

<cfquery ...>
        update mytable set mycolumn =
        <cfqueryparam value="#myformfield#" cfsqltype="cf_sql_float">
        where myprimarykey =
        <cfqueryparam value="#myotherformfield#" cfsqltype="cf_sql_something">
</cfquery>

The cfqueryparam tags aren't absolutely necessary, but they are a best
practice recommendation. If you disclude the cfqueryparam tags remember to
also remove any single quotes surrounding the variable in your query.

Incidentally, the form field type is irrelevant to any of your db work. All
form fields passed to your cf action page will be strings, and CF is a
typeless (or near typeless) environment, so the only thing that's going to
have any affect on your inserts and updates in this respect is going to be
the query code itself.

hth

s. isaac dealey                954-776-0046

new epoch                      http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

tapestry api is opensource     http://www.turnkey.to/tapi

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816

> There was a change made to a table we have where 2 fields
> that used to be
> char were made to be decimal.

> Now, whenever we try to add to or update the table we
> receive a message that
> it cannot "convert varchar to numeric". I'm guessing that
> it has to do with
> the fact the form is an input type of "text" and therefore
> the insert won't
> let it go into the table that way.

> I tried doing a CONVERT( decimal, form.field), but it
> still doesn't work.
> Can someone shed some light on how else to accomplish
> this?

> Thanks,

> Aimee Clark
> Web Developer
> Stinson Morrison Hecker LLP
> 816-691-3461
> [EMAIL PROTECTED]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to