good day, I want to tell you or report a situation in the TDBLookupDataEh.GetLookupValue event when the value of the KeyValue variable is an empty string I show the following message "Could not convert variant of type string". this happens when the table field is empty.
function TDBLookupDataEh.GetLookupValue: Variant; var KeyValue: Variant; begin Result := Null; if DataLink.Active and LookupListActive then begin DataSetGetFieldValues(DataLink.DataSet, KeyFields, KeyValue); if LookupCache then Result := FLookupListCache.ValueOfKey(KeyValue) else if (LookupDataSet <> nil) and LookupDataSet.Active then Result := ListLink.DataSet.Lookup(LookupKeyFieldNames, KeyValue, LookupDisplayFieldName); end; I have marked it in bold so you can see the line
|