diff --git a/packages/fcl-db/src/base/db.pas b/packages/fcl-db/src/base/db.pas index 659bed300b..fabd2b5497 100644 --- a/packages/fcl-db/src/base/db.pas +++ b/packages/fcl-db/src/base/db.pas @@ -506,6 +506,7 @@ type procedure RangeError(AValue, Min, Max: Double); procedure SetDisplayFormat(const AValue: string); procedure SetEditFormat(const AValue: string); + function GetAsBoolean: Boolean; override; public constructor Create(AOwner: TComponent); override; published diff --git a/packages/fcl-db/src/base/fields.inc b/packages/fcl-db/src/base/fields.inc index 9381dda079..d50c6d576b 100644 --- a/packages/fcl-db/src/base/fields.inc +++ b/packages/fcl-db/src/base/fields.inc @@ -1288,6 +1288,11 @@ begin end; end; +function TNumericField.GetAsBoolean: Boolean; +begin + Result:=GetAsInteger<>0; +end; + { --------------------------------------------------------------------- TLongintField ---------------------------------------------------------------------}