| View previous topic :: View next topic |
| Author |
Message |
alex Guest
|
Posted: Wed Mar 01, 2006 6:03 pm Post subject: Master/detail synchronization when master is in Edit mode |
|
|
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? |
|
| Back to top |
|
 |
Jeff Overcash (TeamB) Guest
|
Posted: Sun Mar 05, 2006 11:03 pm Post subject: Re: Master/detail synchronization when master is in Edit mo |
|
|
alex wrote:
| Quote: | 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) |
|
| Back to top |
|
 |
alex Guest
|
Posted: Mon Mar 06, 2006 6:03 pm Post subject: Re: Master/detail synchronization when master is in Edit mo |
|
|
"Jeff Overcash (TeamB)" <jeffovercash (AT) mindspring (DOT) com> wrote:
| Quote: | alex wrote:
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 |
|
| Back to top |
|
 |
Jeff Overcash (TeamB) Guest
|
Posted: Mon Mar 06, 2006 7:03 pm Post subject: Re: Master/detail synchronization when master is in Edit mo |
|
|
alex wrote:
| Quote: | "Jeff Overcash (TeamB)" <jeffovercash (AT) mindspring (DOT) com> wrote:
alex wrote:
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) |
|
| Back to top |
|
 |
|