Re: Can a boolean ever be set to null?
- From: Jack Leach <dymondjack at hot mail dot com>
- Date: Thu, 2 Jul 2009 10:24:04 -0700
If I remember correctly, the Byte is the datatype that takes the least amount
of bits to store, which struck me as odd... you'd think a boolean would be a
single bit, either 0 or 1, right? apparently that's not the case though. A
boolean actually takes more bits to store than a Byte, which can be one of
255 numbers.
So I would think, based on that, that there would be plenty of room in
memory to store whether a boolean would be true, false, or null.
The workings of bits is way beyond me, but a boolean takes more memory to
store than 0-255, for whatever reason.
--
Jack Leach
www.tristatemachine.com
"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
"Dirk Goldgar" wrote:
"JimBurke via AccessMonster.com" <u49905@uwe> wrote in message.
news:987adb4854b40@xxxxxx
Does Access not allow
Null for a boolean because it only examines one bit when it's dealing with
boolean fields? Just curious as to why they can't be Null. That's the only
reason I can think of.
I'm not sure, but I suspect that all the boolean fields in a table may
actually be store in a block of bits, with one bit per field. This is
purely conjecture, but it would be a space-saving measure. In such a case,
there would be no way to indicate that the field is Null.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
- Follow-Ups:
- Re: Can a boolean ever be set to null?
- From: Allen Browne
- Re: Can a boolean ever be set to null?
- From: Dirk Goldgar
- Re: Can a boolean ever be set to null?
- References:
- Can a boolean ever be set to null?
- From: JimBurke via AccessMonster.com
- Re: Can a boolean ever be set to null?
- From: JimBurke via AccessMonster.com
- Re: Can a boolean ever be set to null?
- From: Klatuu
- Re: Can a boolean ever be set to null?
- From: JimBurke via AccessMonster.com
- Re: Can a boolean ever be set to null?
- From: Dirk Goldgar
- Can a boolean ever be set to null?
- Prev by Date: RE: Need to set Filters on a form based on several drop down boxes
- Next by Date: object or class does not support the set of events
- Previous by thread: Re: Can a boolean ever be set to null?
- Next by thread: Re: Can a boolean ever be set to null?
- Index(es):
Relevant Pages
|