Page 1 of 1
Example of Master/Detail
Posted: 23.11.2007, 01:19
by diegocm
First, I'm sorry.
For some time I'm trying to make an example of master / detail with ZQuery / DataSetProvider / ClientDataSet, but I'm not getting.
I followed the fixed of bugs 43 and 59, but even then still having problems.
Does someone can give me a example, please?
I also got the example in the bug 43...
Posted: 29.11.2007, 13:02
by diegocm
Someone??
My small project is stopped because of this problem.
Will it be that I will have to change the structure?
Thanks for all..
Diego.
Posted: 01.12.2007, 16:27
by acakadut
hi diegocm,
hope this example can solve your problem
i try it for a while, and it's working...
acakadut
Posted: 13.12.2007, 19:30
by diegocm
Hi acakadut.
Thanks for the example.
But isn't working fine. Try to delete or to insert a new record in detail, you'll get a error similar to: "ClientDataSet1: Dataset not in edit or insert mode".
Diego.
Posted: 15.12.2007, 13:22
by acakadut
hi diegocm,
yeah... you'll see that message because the button1 click event is post & applyupdate on clientdataset1 and clientdataset1 datastate not in dsEdit or dsInsert.
u must change clientdataset1 datastate to dsedit / dsinsert before edit or insert in detail, because the button1 click event is posting the clienstdataset1 & applyupdate or u can enabled / disabled the button.
btw... i forget to put Clientdataset2.applyupdates(-1) in button1 click event, to posting clientdataset2, before posting and update make it sure the dataset state is on dsedit / dsinsert.
it's all depend on how u want to make the code...
hope can help u...
san