Browse Source

fcl-db: base: +TFMTBCDField.AsLongWord

git-svn-id: trunk@47235 -
lacak 4 years ago
parent
commit
806ddcdbbc
2 changed files with 13 additions and 1 deletions
  1. 2 0
      packages/fcl-db/src/base/db.pas
  2. 11 1
      packages/fcl-db/src/base/fields.inc

+ 2 - 0
packages/fcl-db/src/base/db.pas

@@ -924,6 +924,7 @@ type
     function GetAsCurrency: Currency; override;
     function GetAsFloat: Double; override;
     function GetAsLargeInt: LargeInt; override;
+    function GetAsLongWord: LongWord; override;
     function GetAsInteger: Longint; override;
     function GetAsString: string; override;
     function GetAsVariant: variant; override;
@@ -933,6 +934,7 @@ type
     procedure SetAsBCD(const AValue: TBCD); override;
     procedure SetAsFloat(AValue: Double); override;
     procedure SetAsLargeInt(AValue: LargeInt); override;
+    procedure SetAsLongWord(AValue: LongWord); override;
     procedure SetAsInteger(AValue: Longint); override;
     procedure SetAsString(const AValue: string); override;
     procedure SetAsCurrency(AValue: Currency); override;

+ 11 - 1
packages/fcl-db/src/base/fields.inc

@@ -3017,6 +3017,11 @@ begin
     Result := 0;
 end;
 
+function TFMTBCDField.GetAsLongWord: LongWord;
+begin
+  Result:=GetAsLargeInt;
+end;
+
 function TFMTBCDField.GetAsInteger: Longint;
 begin
   Result := round(GetAsFloat);
@@ -3112,9 +3117,14 @@ begin
   SetAsBCD(IntegerToBCD(AValue));
 end;
 
+procedure TFMTBCDField.SetAsLongWord(AValue: LongWord);
+begin
+  SetAsLargeInt(AValue);
+end;
+
 procedure TFMTBCDField.SetAsInteger(AValue: Longint);
 begin
-  SetAsBCD(IntegerToBCD(AValue));
+  SetAsLargeInt(AValue);
 end;
 
 procedure TFMTBCDField.SetAsString(const AValue: string);