On Friday, October 20, 2000 1:32:51 PM, Ted Trela wrote:

> Does anyone know where I can get some information on the sort info block of
> a database.  The O'Reilly book states that it is part of  the database
> header and can be used to store record numbers of a variant order.  The call
> to DmDatabaseInfo() allows me to retrieve the LocalID of the 'sort table' ,
> but the reference documentation seems to indicate that it is the only(?)
> sort table for the database and I can't find any documentation on the layout
> of the table or what it really is.
>
> What I'm trying to do is have a database with several thousand records
> stored in one order, and quickly be able to display in a different order
> without having to sort the whole database each time I switch [it takes on
> the order of 30 seconds].
>

It's whatever you want it to be.  I'd suggest storing an array of record
numbers, sorted in the alternate order.  Since the sort block can be no
bigger than 64K, with each record number 2 bytes, you'll be able to handle
32K records in your DB.

Create it in the same manner you'd create an app info block.

Neil
--
Neil Rhodes
[EMAIL PROTECTED]            Available for contract programming
Coauthor: Palm Programming: the Developer's Guide (O'Reilly)


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to