Browse Source

* Fix bug where BindFields does not raise error when a field is not found (Bug ID 28173)

git-svn-id: trunk@32796 -
michael 9 years ago
parent
commit
081b6ce8a1
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/fcl-db/src/base/dataset.inc

+ 3 - 1
packages/fcl-db/src/base/dataset.inc

@@ -105,7 +105,9 @@ begin
         begin
         FFieldDef := nil;
         FieldIndex := FieldDefs.IndexOf(Fields[i].FieldName);
-        if FieldIndex <> -1 then
+        if FieldIndex = -1 then
+          DatabaseErrorFmt(SFieldNotFound,[Fields[i].FieldName],Self)
+        else
           begin
           FFieldDef := FieldDefs[FieldIndex];
           FFieldNo := FFieldDef.FieldNo;