Browse Source

fcl-db: base: TBCDField.GetDefaultWidth should return Precision+1 (Delphi compatible) insted of only Precision (+1 is for sign and/or decimal separator).
Note: TBCDField in constructor sets FPrecision=15, which is IMHO copied from TFloatField. In case of TBCDField it should be probably 18 - MaxBCDPrecision

git-svn-id: trunk@30684 -

lacak 10 years ago
parent
commit
2eb2791ce9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-db/src/base/fields.inc

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

@@ -2492,7 +2492,7 @@ end;
 function TBCDField.GetDefaultWidth: Longint;
 function TBCDField.GetDefaultWidth: Longint;
 
 
 begin
 begin
-  if Precision > 0 then Result := Precision
+  if Precision > 0 then Result := Precision+1
   else Result := 10;
   else Result := 10;
 end;
 end;