* * *

Author Topic: TSQLQuery Scroll events  (Read 191 times)

kapibara

  • Sr. Member
  • ****
  • Posts: 441
TSQLQuery Scroll events
« on: May 06, 2017, 08:53:35 pm »
I made a test app to learn more about TSQLQuery events but became somewhat puzzled.

If you have SQLite you can run the app, toggle Open Query checkbox to true and watch the log box. The table has three records. Why does the dataset scroll 6 times to open a query that has a resultset with three records?

Directly after opening the query, why is BeforeScroll 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.

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.

Editing and posting a name gives rise to 6 more scrolls.

Any explanations that can help me out of my bewildered state highly welcome.
« Last Edit: May 06, 2017, 10:23:55 pm by kapibara »
Lazarus trunk / fpc 3.0 / Debian Stretch 64-bit

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus