* 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 -
This commit is contained in:
marco 2012-05-12 21:05:41 +00:00
parent 642a180809
commit 2ae09dc995

View File

@ -705,8 +705,9 @@ begin
tmpActive := FLookupDataSet.Active;
try
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!
FLookupDataSet.DisableControls;