Is there way to insert some records into master-dataset, then insert some records into detail-dataset for each master-record, then navigate and modify all inserted records, afterwards apply updates for both master and detail MSQueries? (I was understandable expressed?)
To reach desired effect I perform plenty of monotonous handmade for each pair of master-detail in my application. A huge problem could become solved if way exists.
Cached master-detail and insertions
Thank you for response. I try this option before post began and unfortunately desired effect is not reached.
I explain more detailed. Inserted but not applied master-records has a no values for fields, which values fixed on server side (identity fields, fields with defvalues and the like). I need to set the MasterFields property of a detail-dataset exactly for such fields. In result the master-field has NULL value for all insertions and can not be used for my needs.
I explain more detailed. Inserted but not applied master-records has a no values for fields, which values fixed on server side (identity fields, fields with defvalues and the like). I need to set the MasterFields property of a detail-dataset exactly for such fields. In result the master-field has NULL value for all insertions and can not be used for my needs.
1. You should set the TCustomDADataSet.Options.LocalMasterDetail property to True before dataset opening.
2. If you use fields with default values, to solve the problem, you should set the TCustomMSDataSet.Options.DefaultValues property to True. But if you use identity fields for master/detail relationship, you can not use the CachedUpdates mode.
2. If you use fields with default values, to solve the problem, you should set the TCustomMSDataSet.Options.DefaultValues property to True. But if you use identity fields for master/detail relationship, you can not use the CachedUpdates mode.
Thanks, I has missed the TCustomMSDataSet.Options.DefaultValues property, this became useful in some cases.
It's highly comfortable to use identity fields for master-detail relationships (in my application) and keep all datasets in Cached mode. I tried to find any way to do it. TCustomMSDataSet does not give such possibility, I suspected in general that (it not complaint to Devart).
Not it is necessary to talk that the way indeed exists. As variant to generate and store internal value for such fields and relate details (on client side) by this value, after update this values must be replaced with real values.
Are you plan to add such functionality for SDAC in future conceptually?
It's highly comfortable to use identity fields for master-detail relationships (in my application) and keep all datasets in Cached mode. I tried to find any way to do it. TCustomMSDataSet does not give such possibility, I suspected in general that (it not complaint to Devart).
Not it is necessary to talk that the way indeed exists. As variant to generate and store internal value for such fields and relate details (on client side) by this value, after update this values must be replaced with real values.
Are you plan to add such functionality for SDAC in future conceptually?