• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 497
  • Last Modified:

TClientDataSet.Lookup

What I'm doing wrong?

It doesn't work:

ACE := DBLookupComboBox1.Field.Text;//.Value;
co :=  ClientDataSet1.Lookup('CODI', ACE,'NOM');
 

And it works fine:

ACE := 'AAA';
co :=  ClientDataSet1.Lookup('CODI', ACE,'NOM');

The DBLookupComboBox1.Field.Text;//.Value contens AAA.

How can I pass the DBLookupComboBox1.Field.Value to the
ClientDataSet1.Lookup?

Thanks
0
boc7900
Asked:
boc7900
  • 3
  • 2
1 Solution
 
mocartsCommented:
maybe:
co := ClientDataSet1.Lookup('CODI', DBLookupComboBox1.Text, 'NOM');

mo.
0
 
Mohammed NasmanSoftware DeveloperCommented:
change DBLookupComboBox1.Field.Text to DBLookupComboBox1.Text
0
 
mocartsCommented:
.. as property Field of TDBLookupComboBox is the same as DataField, but you need ListField (lookup value not key value)
wbr, mo.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
boc7900Author Commented:
It works fine.

Thanks
0
 
mocartsCommented:
just for interest...
if it works fine, why grade B? ;)
mo. :)
0
 
boc7900Author Commented:
Sorry. I don't know the importance of grades. I qualified as good, because I thought excelent is an exceptional thing.

Next answer will be graded A if work.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now