EhLib.Com https://forum.ehlib.com/en/ |
|
TDBLookupDataEh.GetLookupValue https://forum.ehlib.com/en/viewtopic.php?f=5&t=1184 |
Page 1 of 1 |
Author: | carlosreyes210177 [ 08 Nov 2022, 02:16 ] |
Post subject: | TDBLookupDataEh.GetLookupValue |
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 |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |