Browse Source

* Patch from Perdhevi/Lacak2 to improve keyfields existence.
Fixes code part of mantis #15286, which turns into a documentation issue now.

git-svn-id: trunk@21281 -

marco 13 years ago
parent
commit
2ae09dc995
1 changed files with 3 additions and 2 deletions
  1. 3 2
      packages/fcl-db/src/base/fields.inc

+ 3 - 2
packages/fcl-db/src/base/fields.inc

@@ -705,8 +705,9 @@ begin
   tmpActive := FLookupDataSet.Active;
   tmpActive := FLookupDataSet.Active;
   try
   try
     FLookupDataSet.Active := True;
     FLookupDataSet.Active := True;
-    FFields.CheckFieldNames(FLookupKeyfields);
-    FLookupDataset.FieldByName(FLookupresultField); // I presume that if it doesn't exist it throws exception, and that a field with null value is still valid
+    FFields.CheckFieldNames(FKeyFields);
+    FLookupDataSet.Fields.CheckFieldNames(FLookupKeyFields);
+    FLookupDataset.FieldByName(FLookupResultField); // I presume that if it doesn't exist it throws exception, and that a field with null value is still valid
     LookupList.Clear; // have to be F-less because we might be creating it here with getter!
     LookupList.Clear; // have to be F-less because we might be creating it here with getter!
 
 
     FLookupDataSet.DisableControls;
     FLookupDataSet.DisableControls;