Browse Source

* patch from mantis #12928 fixing precision of numeric type. FPC specific patch (but no effect on Delphi, so compat).

git-svn-id: trunk@18035 -
marco 14 years ago
parent
commit
0976115115
1 changed files with 4 additions and 1 deletions
  1. 4 1
      packages/fcl-db/src/dbase/dbf.pas

+ 4 - 1
packages/fcl-db/src/dbase/dbf.pas

@@ -1040,7 +1040,10 @@ begin
       FieldDefs.Add(TempFieldDef.FieldName, TempFieldDef.FieldType, 0, false);
 
     if TempFieldDef.FieldType = ftFloat then
-      FieldDefs[I].Precision := TempFieldDef.Precision;
+      begin
+      FieldDefs[I].Size := 0;                      // Size is not defined for float-fields
+      FieldDefs[I].Precision := TempFieldDef.Size;
+      end;
 
 {$ifdef SUPPORT_FIELDDEF_ATTRIBUTES}
     // AutoInc fields are readonly