Browse Source

* BCD-Variant support is now implemented, use it.

git-svn-id: trunk@16980 -
joost 14 years ago
parent
commit
a3ebc51add
1 changed files with 2 additions and 6 deletions
  1. 2 6
      packages/fcl-db/src/base/fields.inc

+ 2 - 6
packages/fcl-db/src/base/fields.inc

@@ -2444,8 +2444,7 @@ function TFMTBCDField.GetAsVariant: Variant;
 var bcd: TBCD;
 begin
   If GetData(@bcd) then
-    Result := BCDToDouble(bcd)//remove when complete variant support in fmtbcd.pp will be implemented
-    //Result := VarFMTBcdCreate(bcd) //later invalid variant type cast ?
+    Result := VarFMTBcdCreate(bcd)
   else
     Result := Null;
 end;
@@ -2546,11 +2545,8 @@ begin
 end;
 
 procedure TFMTBCDField.SetVarValue(const AValue: Variant);
-var E:double;
 begin
-  E:=AValue;
-  SetAsBCD(DoubleToBCD(E));//remove when VarToBCD in fmtbcd.pp will be implemented
-  //SetAsBCD(VarToBCD(AValue));
+  SetAsBCD(VarToBCD(AValue));
 end;
 
 procedure TFMTBCDField.SetAsFloat(AValue: Double);