BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need help on retreiving dynamic tClientDataSet values

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using
View previous topic :: View next topic  
Author Message
Reanimateme
Guest





PostPosted: Sat Jan 13, 2007 4:44 am    Post subject: Need help on retreiving dynamic tClientDataSet values Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.