HanslH
2006-06-24 13:27:44 UTC
Can't find the right terms to google myself to the answer to this
simple question :(..
delphi
clipper cdxdbf files
If I probe a boolean field like
c := db.fieldbyname('boolfield').asstring;
I get records showing as 'true',' false' and '' (empty string)
If on the other hand say
if fieldbyname('boolfield').asboolean then
c := 'true'
else if (not fieldbyname('boolfield').asboolean) then
c := 'false'
else
c:= '';
they just come up as true or false
Since I use 'boolean fields' that have to be true/false/undetermined a
lot i'v grown accustomed to making ( one) char- in stead of boolean
fields but how do I test a boolean field in a record for undetermined
content?
simple question :(..
delphi
clipper cdxdbf files
If I probe a boolean field like
c := db.fieldbyname('boolfield').asstring;
I get records showing as 'true',' false' and '' (empty string)
If on the other hand say
if fieldbyname('boolfield').asboolean then
c := 'true'
else if (not fieldbyname('boolfield').asboolean) then
c := 'false'
else
c:= '';
they just come up as true or false
Since I use 'boolean fields' that have to be true/false/undetermined a
lot i'v grown accustomed to making ( one) char- in stead of boolean
fields but how do I test a boolean field in a record for undetermined
content?