Board index » delphi » Creating a persistent boolean field automatically for Interbase table

Creating a persistent boolean field automatically for Interbase table

Hi,

We all know that Interbase does not support boolean data type.  I use
CHAR(1) to store the boolean field and 'T'/'F' to represent the true and
false.

When I try 'Add All Fields' of Field Editors to create all persistent fields
of table, the boolean field I created is actually a string field.  Is that
possible to define some type of field in Interbase and allow the Field
Editor to create boolean persistent field automatically?  Just like what BDE
Paradox table did.  Please advice.

--
Best Regards,
Chau Chee Yang

 

Re:Creating a persistent boolean field automatically for Interbase table


Quote
Chau Chee Yang wrote:

> Hi,

> We all know that Interbase does not support boolean data type.  I use
> CHAR(1) to store the boolean field and 'T'/'F' to represent the true and
> false.

> When I try 'Add All Fields' of Field Editors to create all persistent fields
> of table, the boolean field I created is actually a string field.  

Which is correct because your domain (and you should not use Boolean as your
domain field as that is an ANSI keyword and if IB does support it in the future
you will have problems) is a string, not a boolean data type.

Quote
> Is that
> possible to define some type of field in Interbase and allow the Field
> Editor to create boolean persistent field automatically?  

Nope.  Once IB has a boolean data type IBX will support that data type with the
TBooleanField.  If I mapped one domain (and yours is only one of 3 or 4 that
I've seen people use for a pseudo Boolean type so which do I choose) then if and
when a true Boolean type comes out there will be problems with backwards
compatibility.

Quote
> Just like what BDE
> Paradox table did.  Please advice.

pDox has a native Boolean data type.  This is not the same.

Quote
> --
> Best Regards,
> Chau Chee Yang

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
If there is somebody up there could they throw me down a line.  Just a
little helping hand just a little understanding.  Just some answers to the
questions that surround me now.  If there's somebody up there could
they throw me down a line.               (Fish)

Re:Creating a persistent boolean field automatically for Interbase table


Quote
> Nope.  Once IB has a boolean data type IBX will support that data type
with the
> TBooleanField.  If I mapped one domain (and yours is only one of 3 or 4
that
> I've seen people use for a pseudo Boolean type so which do I choose) then
if and
> when a true Boolean type comes out there will be problems with backwards
> compatibility.

How do you think to trick the problem?

Is there a temporary solution to this problem?

Thanks.

Carlo Marona

Other Threads