Browse Source

* Fixed TFPDataDictionary.findfielddef

git-svn-id: trunk@9390 -
michael 17 years ago
parent
commit
1ab5e28f75
1 changed files with 12 additions and 14 deletions
  1. 12 14
      packages/fcl-db/src/datadict/fpdatadict.pp

+ 12 - 14
packages/fcl-db/src/datadict/fpdatadict.pp

@@ -1263,22 +1263,20 @@ begin
   else
   else
     begin
     begin
     If (FLastMatchTableDef<>Nil) then
     If (FLastMatchTableDef<>Nil) then
-      begin
       TD:=FLastMatchTableDef;
       TD:=FLastMatchTableDef;
-      If (TD<>Nil) then
-        Result:=TD.Fields.FindField(FN)
-      else
+    If (TD<>Nil) then
+      Result:=TD.Fields.FindField(FN);
+    If Result=Nil then
+      begin
+      // Hard scan of all tables...
+      I:=0;
+      While (Result=Nil) and (I<Tables.Count) do
         begin
         begin
-        // Hard scan of all tables...
-        I:=0;
-        While (Result=Nil) and (I<Tables.Count) do
-          begin
-          TD:=Tables[i];
-          Result:=TD.Fields.FindField(FN);
-          If (Result<>Nil) then
-            FLastMatchTableDef:=TD;
-          Inc(I);
-          end;
+        TD:=Tables[i];
+        Result:=TD.Fields.FindField(FN);
+        If (Result<>Nil) then
+          FLastMatchTableDef:=TD;
+        Inc(I);
         end;
         end;
       end;
       end;
     end;
     end;