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 

Nested CDS & OnUpdateData event

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Liz
Guest





PostPosted: Wed Aug 20, 2003 8:51 am    Post subject: Nested CDS & OnUpdateData event Reply with quote



I have a client data set passed back to the server via a provider containing
a single master record to be inserted and a number of detail records.

I need to check that I have a minimum number of detail records and reject
the whole lot if there aren't enough.

I am trying to use the OnUpdateData event but I can't seem to get the
details of the nested datasets.
I have tried "MyCDS.FieldByName('NestedDSName').DataSet.RecordCount" but
this returns the number of records in the master dataset - not the detail.

I have also tried
"MyCDS.FieldByName('NestedDSName').DataSet.DataSetField.NestedDataSet.Record
Count" but although this compiles, it won't execute.

There's got to be a way. I would rather use the BeforeApplyUpdates event but
can't see how to do it there either.

Any suggestions?

Liz


Back to top
moritenw
Guest





PostPosted: Wed Aug 20, 2003 9:56 am    Post subject: Re: Nested CDS & OnUpdateData event Reply with quote



try with
TDataSetField(MyCDS.FieldByName(NestedDSName)).NestedDataSet.Recordcount


"Liz" <liznospam (AT) dbsfinssys (DOT) co.uk> дÈëÓʼþ
news:3f433902$1 (AT) newsgroups (DOT) borland.com...
Quote:
I have a client data set passed back to the server via a provider
containing
a single master record to be inserted and a number of detail records.

I need to check that I have a minimum number of detail records and reject
the whole lot if there aren't enough.

I am trying to use the OnUpdateData event but I can't seem to get the
details of the nested datasets.
I have tried "MyCDS.FieldByName('NestedDSName').DataSet.RecordCount" but
this returns the number of records in the master dataset - not the detail.

I have also tried

"MyCDS.FieldByName('NestedDSName').DataSet.DataSetField.NestedDataSet.Record
Count" but although this compiles, it won't execute.

There's got to be a way. I would rather use the BeforeApplyUpdates event
but
can't see how to do it there either.

Any suggestions?

Liz





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) 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.