Explorar el Código

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

git-svn-id: trunk@32796 -
michael hace 9 años
padre
commit
081b6ce8a1
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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;