NULL is used to represent 'no memory address' so it has to have a numerical
value.  Generally this is zero.

> Maybe there is no way to do this as the bits and bytes have to indicate
> something with zero being the lowest value.
Depends on the data type (and the data range).  You don't mention
specifically what that is.  Numeric can be integer, unsigned, float, etc.  I
tend to pick a value that is unlikely to be represented in the data range to
indicate no value has been entered.

----- Original Message -----
From: "Jay Francis" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 9:58 AM
Subject: NULL data question


> I have several numeric fields in a record.  Some are
> required, some are not.  If an unrequired field is left
> blank,  shouldn't I  write to the field as NULL?   When
> I do, and then get the value from the databases after
> the save, the structure member indicates that the value
> is 0.  I can always test for the value of zero so the
> display is left blank (NULL) but I'm not wanting the
> underlying data to be zero.  Maybe there is no way to
> do this as the bits and bytes have to indicate
> something with zero being the lowest value.
> Curious.  Thanks Jay
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to