Hi everyone,

Warning: I am not only a Reactor newbie, but also a Cold Fusion newbie... :)

I'm trying to debug an application where a Checkbox field _can_ get
set to 1 (from the webform), but cant get set to 0. When the field is
set to 0 directly in the database, then the output on the HTML page is
correct, so the RDB -> object mapping seems to be working at least
somewhat. But when an HTML form is submitted with the checkbox value
unchecked, the change is not reflected in the database (although going
from unchecked to checked _does_ work).

The line in the cfform looks like this:

<cfinput type="checkbox" label="Loop" name="loop" id="loop" value="1"
checked="#animation.getloop()#"/>

It feels as though it might be a problem translating a CF Boolean
value into MSSQL (the concerned column is of type 'bit', so values are
stored as '0' or '1'). In animationDAO.cfc, I see that the qUpdate
cfquery code looks like this:

                                #Convention.formatUpdateFieldName('loop')# = 
<cfqueryparam
                                        cfsqltype="cf_sql_bit"
                                        
                                        value="#arguments.to.loop#"
                                         />

Somehow, the value of '0' is ending up as '1' in the database. Can
anyone shed any light?

Etienne


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to