开发者

How to use Booleans with Delphi XE2 dbExpress and Firebird 2.5

开发者 https://www.devze.com 2023-04-03 08:23 出处:网络
Does the new XE2 dbExpress still ha开发者_JAVA技巧ve problems using Boolean fields?The best way is to use a domain

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

精彩评论

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

关注公众号