Bladeren bron

* Fixed bug #8095

git-svn-id: trunk@5903 -
michael 18 jaren geleden
bovenliggende
commit
13335d84d8
1 gewijzigde bestanden met toevoegingen van 9 en 6 verwijderingen
  1. 9 6
      fcl/db/fields.inc

+ 9 - 6
fcl/db/fields.inc

@@ -1625,12 +1625,15 @@ procedure TFloatField.SetAsString(const AValue: string);
 Var R : Double;
 
 begin
-  try
-    R := StrToFloat(AValue);
-    SetAsFloat(R);
-  except
-    DatabaseErrorFmt(SNotAFloat, [AValue]);
-  end;
+  If (AValue='') then
+    Clear
+  else  
+    try
+      R := StrToFloat(AValue);
+      SetAsFloat(R);
+    except
+      DatabaseErrorFmt(SNotAFloat, [AValue]);
+    end;
 end;
 
 procedure TFloatField.SetVarValue(const AValue: Variant);