Boolean data types
Firebird versions below 3.0 do not support boolean data types.
Use a DOMAIN that uses a SMALLINT type (other integer types may work as well - please test and adjust text):
CREATE DOMAIN "BOOLEAN"
AS SMALLINT
CHECK (VALUE IS NULL OR VALUE IN (-1,0,1))
/* -1 used for compatibility with FPC SQLDB; 1 is used by many other data access layers */
;
Let your field/column use this domain type e.g.
CREATE TABLE MYTABLE
(
...
MYBOOLEANCOLUMN "BOOLEAN",
);
Now you can use .AsBoolean for assigning field values etc
Partager