?
Solved

TClientDataSet.Lookup

Posted on 2003-03-06
6
Medium Priority
?
492 Views
Last Modified: 2007-12-19
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
Comment
Question by:boc7900
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 9

Expert Comment

by:mocarts
ID: 8082899
maybe:
co := ClientDataSet1.Lookup('CODI', DBLookupComboBox1.Text, 'NOM');

mo.
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 8083017
change DBLookupComboBox1.Field.Text to DBLookupComboBox1.Text
0
 
LVL 9

Accepted Solution

by:
mocarts earned 150 total points
ID: 8083568
.. as property Field of TDBLookupComboBox is the same as DataField, but you need ListField (lookup value not key value)
wbr, mo.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:boc7900
ID: 8086624
It works fine.

Thanks
0
 
LVL 9

Expert Comment

by:mocarts
ID: 8086950
just for interest...
if it works fine, why grade B? ;)
mo. :)
0
 

Author Comment

by:boc7900
ID: 8088622
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month13 days, 6 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question