DBGrid chokes on large DB files; e.g. 100,000 rows - about 100 characters of data in each row. The main issue seems to center around the Last function. When the user slides the scrollbar to the bottom of the DBGrid, the Last function is triggered and my program crashes with a memory overload. Right-clicking on the scrollbar and selecting the Bottom option results in the seem fate.
Using the Locate function - while helpful for smaller DBs - won't work on larger ones. Same memory overload problem with the same Last function.
This is an issue that's been discussed by many over the years. I am using SQLite3 DBs. Can this problem be solved by using a different database?
I've always wondered if the solution might be centered around the dgThumbTracking option. It seems that the concept around dgThumbTracking is that the user can slide the scrollbar to a desired spot in the file - but no data is read and no data is displayed until a mouse-up on the scrollbar.
With a smaller file, say under 50,000 records, the user can use the scrollbar-bottom feature to get to the last record AND proportionately adjust the height of the scrollbar. Now, he can profitably use the dgThumbTracking feature. It "feels" like only the visible rows have been read from the DB. Clearly such a small number of rows will not choke memory.
Any good solutions out there?