Subject | RE: [IBO] Howto manually update control when detail dataset chang es |
---|---|
Author | Norman Dunbar |
Post date | 2001-11-23T15:02:58Z |
Mirco wrote :
scrolls, the field linking the detail data set to the master must change, so
the detail query must therefore be re-queried ?
Example :
Customer and Invoices, Customer is master and Invoices the detail. They are
linked by Customer_number.
The master query, for sake of argument is 'select * from customer' and the
details is 'select * from invoice' - they are joined in the correct, which
is set to link them by customer_number. (MasterLink probably - I'm working
blind here :o) )
So, when the customer details are displayed, the invoice details are really
'select * from invoice where customer_number = :customer_number' and the
parameter is automagically filled in from the customer dataseet's current
row.
When the customer dataset is scrolled, the customer_number (probably)
changes, so the detail is re-queried.
Hence, you would put your processing in the AfterScroll event as advised.
HTH
Norman.
PS. Or have I missed the point (again) ?
-------------------------------------
Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
mailto:Norman.Dunbar@...
Tel: 0113 289 6265
Fax: 0113 289 3146
URL: http://www.Lynx-FS.com
-------------------------------------
This email is intended only for the use of the addressees named above and
may be confidential or legally privileged. If you are not an addressee you
must not read it and must not use any information contained in it, nor copy
it, nor inform any person other than Lynx Financial Systems or the
addressees of its existence or contents. If you have received this email
and are not a named addressee, please delete it and notify the Lynx
Financial Systems IT Department on 0113 2892990.
>> The question is: how do I know when the detail dataset requeries?Correct me if I'm wrong on this, but surely, when the master dataset
>> There is a straight-forward answer to this, which I heard several
>> times: do your update whenever the *master* datasource changes the
>> row.
>> As I said, this seems wrong to me. No, rather ineffective. It works,
>> yes, but you miss the point that
>> 'master dataset scroll' is not equal to 'detail dataset requery'.
scrolls, the field linking the detail data set to the master must change, so
the detail query must therefore be re-queried ?
Example :
Customer and Invoices, Customer is master and Invoices the detail. They are
linked by Customer_number.
The master query, for sake of argument is 'select * from customer' and the
details is 'select * from invoice' - they are joined in the correct, which
is set to link them by customer_number. (MasterLink probably - I'm working
blind here :o) )
So, when the customer details are displayed, the invoice details are really
'select * from invoice where customer_number = :customer_number' and the
parameter is automagically filled in from the customer dataseet's current
row.
When the customer dataset is scrolled, the customer_number (probably)
changes, so the detail is re-queried.
Hence, you would put your processing in the AfterScroll event as advised.
HTH
Norman.
PS. Or have I missed the point (again) ?
-------------------------------------
Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
mailto:Norman.Dunbar@...
Tel: 0113 289 6265
Fax: 0113 289 3146
URL: http://www.Lynx-FS.com
-------------------------------------
This email is intended only for the use of the addressees named above and
may be confidential or legally privileged. If you are not an addressee you
must not read it and must not use any information contained in it, nor copy
it, nor inform any person other than Lynx Financial Systems or the
addressees of its existence or contents. If you have received this email
and are not a named addressee, please delete it and notify the Lynx
Financial Systems IT Department on 0113 2892990.