Example of Master/Detail

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
diegocm
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 22.10.2007, 19:48

Example of Master/Detail

Post 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...
diegocm
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 22.10.2007, 19:48

Post 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.
acakadut
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 30.11.2007, 16:36

Post by acakadut »

hi diegocm,

hope this example can solve your problem

i try it for a while, and it's working...



acakadut
You do not have the required permissions to view the files attached to this post.
diegocm
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 22.10.2007, 19:48

Post 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.
acakadut
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 30.11.2007, 16:36

Post 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
You do not have the required permissions to view the files attached to this post.
Post Reply