Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

checkbox type on datawindows (string fields): off value must be NULL (PB10.2)

352 views
Skip to first unread message

Roberto Lammoglia

unread,
Dec 5, 2006, 7:45:45 AM12/5/06
to
Dear all,
i am freezed on a little item:

For legacy to old applications,
i need to assign value 'T' or NULL on string column is_twin that is defined
style type checkbox.

data value for ON = 'T' work fine

but i don't know how to assign null to

data value for OFF = NULL !!! (dw take 0 the value)

My question is:

can I assign to OFF null value and if Yes, in what mode ??


TIA
bob


Richard Coleman

unread,
Dec 5, 2006, 10:48:28 AM12/5/06
to
Roberto,

I believe you can use "null!" for the off value.

That's right the word "null" followed by an exclamation point...an
enumerated value.

Richard

"Roberto Lammoglia" <NOSPA...@becromal.it> wrote in message
news:45757809$1@forums-1-dub...

Roberto Lammoglia

unread,
Dec 6, 2006, 1:41:17 AM12/6/06
to
Richard,

null! does'nt work.

:-(Bob


"Richard Coleman" <Richard Coleman at DRE DOT CA DOT GOV> wrote in message
news:4575a2dc$1@forums-1-dub...

Paul Horan[TeamSybase]

unread,
Dec 6, 2006, 8:50:49 AM12/6/06
to
Don't use the NULL value to indicate a non-null concept... NULL, as defined,
has NO meaning whatsoever.

Checkboxes represent binary states. Pick a value that means "YES" and a
value that means "NO", and don't allow any other values, especially NULL.
Then run an UPDATE statement on your database and set all the NULL values to
the "NO" value. Also - set a DEFAULT value on the column to one of the two,
so that NULLs don't get inserted anymore.
Even for 3-state checkboxes, the third state means "one or the other", so
pick a value that means that. Don't use NULL here either.

Sounds like a pain, but working with NULLs is even more of a pain.

Paul Horan[TeamSybase]

"Roberto Lammoglia" <NOSPA...@becromal.it> wrote in message
news:45757809$1@forums-1-dub...

Roberto Lammoglia

unread,
Dec 6, 2006, 9:02:45 AM12/6/06
to
Finally i've got use '0'.
This was a big works to me, because i have touched all programs and database
containt.
Only for legacy to old applications, i tried to use NULL as a state for NO
before to work Hard !!

Philisophically speaking i know that NULL value means unknown-undefined !

however many thanks to all.

bob

"Paul Horan[TeamSybase]" <phoran AT sybase DOT com> wrote in message
news:4576d8c9$1@forums-1-dub...

modern talking

unread,
May 19, 2015, 11:17:48 AM5/19/15
to
Actually, it's trivial: say, you set the "On" value to 'Y' and "Off" valye to 'N'. Anywhere in your pre-update code, put something like this:

li_rc = SetNull(ls_null)
ls_copy = tabpage_enh_cusip.dw_1.GetItemstring( ll_next_mod, 'maturity_parent_child_copy' )
IF ls_copy = 'N' THEN
tabpage_enh_cusip.dw_1.Object.maturity_parent_child_copy.Primary[ll_next_mod] = ls_null
END IF

VOILA!
0 new messages