开发者

How to use Booleans with Delphi XE2 dbExpress and Firebird 2.5

Does the new XE2 dbExpress still ha开发者_JAVA技巧ve problems using Boolean fields?


The best way is to use a domain

CREATE DOMAIN BOOL AS
SMALLINT
DEFAULT 0
CHECK (value in (0,1) or value is null);

Regards


AFAIK Firebird doesn't have BOOLEAN types.


Create a Char(1) field. Set values "Y" or "N"

http://www.firebirdfaq.org/faq12/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜