Discussion:
Master/detail synchronization when master is in Edit mode
(too old to reply)
alex
2006-03-01 16:01:13 UTC
Permalink
Hi I have this problem.
I have a TIBDataSet called "qMaster" and another one called
"qDetail".

qDetail is connected with qMaster in a master/detail config using a TDataSource. No problem in browsing.

But when I put in edit mode the master and I modify one of the master/detail indexes, the slave does not synchronize; looking at the slave parameters, it continues to have the old values.

How can I force the slave to "refresh" its parameters, without having to modify them directly?
Jeff Overcash (TeamB)
2006-03-05 21:39:17 UTC
Permalink
Post by alex
Hi I have this problem.
I have a TIBDataSet called "qMaster" and another one called
"qDetail".
qDetail is connected with qMaster in a master/detail config using a TDataSource. No problem in browsing.
But when I put in edit mode the master and I modify one of the master/detail indexes, the slave does not synchronize; looking at the slave parameters, it continues to have the old values.
How can I force the slave to "refresh" its parameters, without having to modify them directly?
The way TDataset works for this is that the details are opened after a scroll
even of the master. You can always manually close and reopen the detail when
the master changes it's key value. This usually means though that you have tied
your keys to business logic. This is always a bad design. Your primary key
should never be something tied to business logic.
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
This sad little lizard told me that he was a brontosaurus on his mother's
side. I did not laugh; people who boast of ancestry often have little else
to sustain them. Humoring them costs nothing and adds to happiness in
a world in which happiness is in short supply. (RAH)
alex
2006-03-06 16:00:09 UTC
Permalink
Post by Jeff Overcash (TeamB)
Post by alex
Hi I have this problem.
I have a TIBDataSet called "qMaster" and another one called
"qDetail".
qDetail is connected with qMaster in a master/detail config using a TDataSource. No problem in browsing.
But when I put in edit mode the master and I modify one of the master/detail indexes, the slave does not synchronize; looking at the slave parameters, it continues to have the old values.
How can I force the slave to "refresh" its parameters, without having to modify them directly?
The way TDataset works for this is that the details are opened after a scroll
even of the master. You can always manually close and reopen the detail when
the master changes it's key value. This usually means though that you have tied
your keys to business logic. This is always a bad design. Your primary key
should never be something tied to business logic.
Actually I need to show different detail values everytime the user selects (while in edit mode) a different value in one of the fields. So I used this field as the master/detail bind.


Actually I use this system to select which details shows when I change
Jeff Overcash (TeamB)
2006-03-06 17:58:00 UTC
Permalink
Post by alex
Post by Jeff Overcash (TeamB)
Post by alex
Hi I have this problem.
I have a TIBDataSet called "qMaster" and another one called
"qDetail".
qDetail is connected with qMaster in a master/detail config using a TDataSource. No problem in browsing.
But when I put in edit mode the master and I modify one of the master/detail indexes, the slave does not synchronize; looking at the slave parameters, it continues to have the old values.
How can I force the slave to "refresh" its parameters, without having to modify them directly?
The way TDataset works for this is that the details are opened after a scroll
even of the master. You can always manually close and reopen the detail when
the master changes it's key value. This usually means though that you have tied
your keys to business logic. This is always a bad design. Your primary key
should never be something tied to business logic.
Actually I need to show different detail values everytime the user selects (while in edit mode) a different value in one of the fields. So I used this field as the master/detail bind.
Actually I use this system to select which details shows when I change
Then one way to do this is to add an OnChange event of the TDatasource. When
you see that particular field change then close and open the detail.
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
This sad little lizard told me that he was a brontosaurus on his mother's
side. I did not laugh; people who boast of ancestry often have little else
to sustain them. Humoring them costs nothing and adds to happiness in
a world in which happiness is in short supply. (RAH)
Loading...