Am Montag, den 20.03.2006, 20:23 +0000 schrieb Tom:
>      I was wondering if I wanted to sort my records on the Palm. Is there a 
> API that will do this or do I have to manually do this?
> By loading a record in and comparing what I want to sort on?

Take a look at DmQuickSort. Of course you will have to pass a compare
function (after all the OS doesn't know how to sort your specific
structures), but DmQuickSort takes care of all the actual sorting.

> Also the RecordInfo, this is only used if I want to set the record to busy or 
> whatever? Some of the stuff for database programming on the Palm is very 
> vague.

You can usually ignore the recordInfo. When using DmGetResource/Record
the record will be set to busy automatically.

> And last but not least, can I create 1 main record that has a list of 
> variables and have other records index this list? 
> (ie: record 1 has State names in it: Mass, NY, NJ.....) 
> 
> Can I tell my other records to have a index number into this record for the 
> state? Or is this something that shouldn't be done?

Well, as far as the PalmOS is concerned you can put into your records
whatever you want (<64k) and reference it whichever way you want. 

If you come from the desktop, think of a Palm database as some kind of
directory containing files (records) which you can only access by index
in the list, not by name, and which have a 64k limit. 

Daniel


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

Reply via email to