Hello Everyone,
I have two ClientDatasets in a master/detail relationship (cdsCropType-Master, cdsCrops-Detail) . I have no problems inserting data into the master clientdataset. However when I try inserting data into the Detail clientdataDset the OnAfterPost even handler of the detail clientDataSet is called automatically for reasons unknown to me. This causes the OnReconcileError dialog to pop up indicating that the key field in the newly inserted record of the Detail clientDataset cannot be NULL (because the Detail record is not populated with the necessary data as yet of course). The only field that is populated is the field on which the tables are linked. Is there some way I can prevent the OnAfterPost event handle of the Detail ClientDataSet from automatically getting executed until after I populate the necessary fields of the newly inserted record?
Liam
I have two ClientDatasets in a master/detail relationship (cdsCropType-Master, cdsCrops-Detail) . I have no problems inserting data into the master clientdataset. However when I try inserting data into the Detail clientdataDset the OnAfterPost even handler of the detail clientDataSet is called automatically for reasons unknown to me. This causes the OnReconcileError dialog to pop up indicating that the key field in the newly inserted record of the Detail clientDataset cannot be NULL (because the Detail record is not populated with the necessary data as yet of course). The only field that is populated is the field on which the tables are linked. Is there some way I can prevent the OnAfterPost event handle of the Detail ClientDataSet from automatically getting executed until after I populate the necessary fields of the newly inserted record?
Liam