In article <>,
"William Mahoney" wrote:

> Have a problem. I'm developing an application which reading a large database
> file (DBF) and displaying it in the list control. Because of the size of the
> file (>15 MB, later it will be increased) I'm using a virtual list (owner
> data).
> But now I need to sort data in the list. AFAIK to perfirm this I should read
> the whole file. In this case my program starts several minutes!!! It doesn't
> have to be like this [(C) Pink Floyd]...
> Is there any methods to load a large amount of data as quickly as possible?
> Or I just should humble, 'cause sorting of large amount of data cannot be
> performed in seconds?

It is a database! Make the database do the work. Just do a query to find
out how many items there are, and create a virtual list control with
that many items.

The user tells you how it should be sorted. When you need to draw
something, you tell the database you want the visible fields of records
m thru n of table blah sorted by foo. Not much point asking for what
isn't visible. Databases are good at sorting tables.