Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 12 Jul 2024, 20:16

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: 08 Nov 2022, 02:16 
Offline

Joined: 06 Sep 2016, 02:27
Posts: 19
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group