I made a test app to unerstand more about TSQLQuery events. It requires SQLite and has one table with three records.
1) Why does the dataset scroll 6 times to open a query that has a resultset with three records?
2) Also, directly after opening the query, why is
BeforeScroll/AfterScroll triggered when you click the first item in the DBLookupListBox? Shouldn't the dataset already be on that position and no scroll needed? Later, if you click an item twice, only the first time triggers a scroll event.
3) At query open, why does it scroll from record 1 an then immediately to record 3? (First and last record) and then to record 1 again, followed by 2, 3 and 3 again? Yes, why does it scroll from record 3 two times in a row? Toggle "Active Query" to true and immediately look at the Log window, line 4 and 5.
4) Editing and posting a name gives rise to 6 more scrolls.
Explanations whats going on are highly welcome.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Scroll.png
Type: image/png
Size: 35058 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170507/fb03f688/attachment-0001.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: scrollius.zip
Type: application/zip
Size: 3988 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170507/fb03f688/attachment-0001.zip>
