Miller, Gary wrote in message <6016@palm-dev-forum>...
>
>Background: I have an app that is just a front-end to a table of
>information. In Palm-speak, it's a Form with a Table that displays Records
>from a Database. Because the table is too long to scroll through, I want to
>provide a query mechanism.
>
>Question: How can I return the results of a query to the user.
>
>Answer: I've thought of two ways:
>1) Identify the records matching the search criteria using their unique
IDs.
>I'm not clear on how I could also sort these records.
>2) Copy the matching rows to a second table that is used for displaying the
>records. The second table could then be sorted using quicksort.
>
>Explanation:
>The second case appears less complicated, but copying records might be
>expensive. The records are 26 - 34 bytes long. Also, if the search isn't
>narrow, then almost an entire copy of the database will be made.
You could use a variant on solution #2. Instead of copying the matching
records into a new table, put the -handles- to the matching records into
your new table.
I'm not entirely sure what you meant in solution #1, btw. You'd still
need to store the set of matching IDs somewhere ... actually that's
not all that different than storing the handles somewhere, is it?
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi/sec: not just a good idea, it's the LAW!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html