| View previous topic :: View next topic |
| Author |
Message |
Liz Guest
|
Posted: Wed Aug 20, 2003 8:51 am Post subject: Nested CDS & OnUpdateData event |
|
|
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
|
Posted: Wed Aug 20, 2003 9:56 am Post subject: Re: Nested CDS & OnUpdateData event |
|
|
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 |
|
 |
|