 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Reanimateme Guest
|
Posted: Sat Jan 13, 2007 4:44 am Post subject: Need help on retreiving dynamic tClientDataSet values |
|
|
At runtime we create the follow dataset:
// Set up the static LOV in memory datasets here
// Gender LOV
FRIA0033dm.cdsGenderLov.FieldDefs.Add('Code', ftString, 1, False);
FRIA0033dm.cdsGenderLov.FieldDefs.Add('Description', ftString, 7,
False);
FRIA0033dm.cdsGenderLov.CreateDataset;
FRIA0033dm.cdsGenderLov.Open;
FRIA0033dm.cdsGenderLov.Append;
FRIA0033dm.cdsGenderLov.FieldByName('Code').AsString := 'M';
FRIA0033dm.cdsGenderLov.FieldByName('Description').AsString :=
'Male';
FRIA0033dm.cdsGenderLov.Post;
FRIA0033dm.cdsGenderLov.Append;
FRIA0033dm.cdsGenderLov.FieldByName('Code').AsString := 'U';
FRIA0033dm.cdsGenderLov.FieldByName('Description').AsString :=
'Unknown';
FRIA0033dm.cdsGenderLov.Post;
FRIA0033dm.cdsGenderLov.Append;
FRIA0033dm.cdsGenderLov.FieldByName('Code').AsString := 'F';
FRIA0033dm.cdsGenderLov.FieldByName('Description').AsString :=
'Female';
FRIA0033dm.cdsGenderLov.Post;
FRIA0033dm.cdsGenderLov.IndexFieldNames := 'Code';
dblucbGender.KeyField := 'Code';
dblucbGender.ListField := 'Code;Description';
// End of Gender LOV
We need to query this in memory table to populate a string field on a
Delphi 7 form. We are thinking of using the lookup method but it is a
variant and the examples return more than one value. We already point a
TDbLookupComboBox at the dataset and it works just fine. But we also
need to populate another text field from the OnExit event from the
LUCB. We just need to query on code and return description. Can we do a
tQuery against a tClientDataSet in memory?
Thanks.
Bruce |
|
| Back to top |
|
 |
|
|
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 vote in polls in this forum
|
|