A couple of quick palm database questions:
Question 1:
Does Palm store any type of index table for Unique ID's or does it do a
linear search every time you call DmFindRecord();
Question 2:
I am assuming that the above answer is 'does a linear search', so I am
implementing my own Add, Edit, and Delete functions for the palm database
which basically guarantees that the index of the record is not going to
change througout the life of the record. I am using DmSetRecordInfo to set
the delete bit to indicate a deleted record (just incase I need to re-index
an entire database), however, I am not deleting the record. I will fill
that record position the next time an Add is done. Using this type of
implementation, I need to store the "next deleted" index if two records get
deleted in a row. I want to store this in the records UniqueID field to
conserver space, but, I am worried about having duplicate unique ID's. What
will palm do if it two records have the same uniqueID??? Will setting the
delete bit mess anything up?
Question 3:
Is there anyway to circumvent the need to use Dm functions to write to
memory in the data store???? I would like to be able to write to the memory
directly.
Question 4:
I've read that the maximum record size that you can store is NEAR 64K.
Has anyone experimented with this limit? I think, for the data that I am
storing, I may be able to store a whole *database* worth of records in one
record of 64K, but, I would need to know exactly how big the chunk is/can
be.. This would alleviate the need for all of the overhead used in creating
records in the database. Plus, I could lock down the memory once and then
manipulate it directly and not need to derefernce the handle stored at the
offset of the record in the database header evertime I need to access a
record. This is why I asked question 3.
Thanks in advance,
Brad Figler
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/