On 01/04/2011 05:18 PM, [email protected] wrote:


On Tue, 4 Jan 2011, Koenraad Lelong wrote:

Hi,

I have a database (firebird) with master-data, detail-data and
sub-detail-data.
In lazarus 0.9.28.2, svn 22279, I defined a TIBConnection, a
TSQLTransaction and three TSQLQuery's. The detail has as its datasource
a datasource coupled with the master. The subdetail has as its
datasource a datasource coupled with the detail.
To show the data I have three TDBGrids, their datasources are those
three datasources coupled with the three queries.

When I start the application, the master that shows has several details,
each having several sub-details. When I scroll the details, the
subdetails follow the detail. That's good. But when I scroll the master,
only the details follow, the subdetail-grid goes blank.

To try finding what happens I added a button that opens the
sub-detail-query. If I click on it I get the expected subdetails. When I
scroll the master again, the subdetail disappears again. Again I can get
it back by clicking my debug-button.

To debug this further, I added events for beforescroll, afterscroll,
beforeclose and beforeopen for all three queries which write to a
logfile. It seems that the beforeclose event is not fired for the
subdetail-query, although it is closed somehow.

I hope this makes sense to someone. Is there anything I'm missing ? Or
have I found a bug ?

There is no principle difference between the master/detail and the
detail/subdetail relation, so I'd expect your setup to work.

Can you check whether the AfterScroll events occur for master/detail/subdetail ?

Michael.
That's a bug I had encountered a very long time ago.

Stephano


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to