Subject | Re: [IBO] Howto manually update control when detail dataset chang es |
---|---|
Author | mirco@intellitec.de |
Post date | 2001-11-23T15:12:04Z |
--- In IBObjects@y..., Norman Dunbar <norman.dunbar@l...> wrote:
the 'requery of the detail' dataset, not one of the (perhaps
multiple) events causing the requery.
When I refresh my visualization in the AfterScroll of the master,
then I would miss all those other situations where the detail might
requery. (Which I probably don't know all... I am dealing with the
detail set and want to display that.... why bother with other
queries?)
What if the master is a detail query itself? Then it gets requeried
if another query scrolls... does it send an AfterScoll then? Does my
visualization update properly?
Mirco
> Mirco wrote :several
>
> >> The question is: how do I know when the detail dataset requeries?
>
> >> There is a straight-forward answer to this, which I heard
> >> times: do your update whenever the *master* datasource changesthe
> >> row.works,
> >> As I said, this seems wrong to me. No, rather ineffective. It
> >> yes, but you miss the point thatchange, so
> >> 'master dataset scroll' is not equal to 'detail dataset requery'.
>
> Correct me if I'm wrong on this, but surely, when the master dataset
> scrolls, the field linking the detail data set to the master must
> the detail query must therefore be re-queried ?They are
>
> Example :
>
> Customer and Invoices, Customer is master and Invoices the detail.
> linked by Customer_number.and the
> The master query, for sake of argument is 'select * from customer'
> details is 'select * from invoice' - they are joined in thecorrect, which
> is set to link them by customer_number. (MasterLink probably - I'mworking
> blind here :o) )are really
>
> So, when the customer details are displayed, the invoice details
> 'select * from invoice where customer_number = :customer_number'and the
> parameter is automagically filled in from the customer dataseet'scurrent
> row.(probably)
>
> When the customer dataset is scrolled, the customer_number
> changes, so the detail is re-queried.Correct so far
>advised.
> Hence, you would put your processing in the AfterScroll event as
>Wrong for the reason I stated before. The event to react on is
the 'requery of the detail' dataset, not one of the (perhaps
multiple) events causing the requery.
When I refresh my visualization in the AfterScroll of the master,
then I would miss all those other situations where the detail might
requery. (Which I probably don't know all... I am dealing with the
detail set and want to display that.... why bother with other
queries?)
What if the master is a detail query itself? Then it gets requeried
if another query scrolls... does it send an AfterScoll then? Does my
visualization update properly?
Mirco