All pastes #837462 Raw Edit

Untitled65654

public text v1 · immutable
#837462 ·published 2007-12-29 18:17 UTC
rendered paste body
vanRijn> judd: hey there!  =:)
<vanRijn> judd: how do you handle local database adds?  what do you do about the record_id?  do you generate one?
<judd> Hi
<judd> I just make up a unique number for local use.  When I insert it I use 0, and the Palm will create a unique one.
<vanRijn> judd: do you know, is it possible to do this...  retrieve a DB from the palm, add new records and make the record_id for those records max(record_id for the database) +1, consecutively, and then either install that database back to the palm (in which case, I would expect that the palm wouldn't have a problem with keeping the record_ids that were created by the PC application), or adding the records to the database with the reco
<vanRijn> rd_ids set already?
<judd> I think that would work.  Isn't there a next id field that you would have to bump up also?
<judd> Actually, I have code that does that.  I used pi_file_open, pi_file_append, etc. to do the job.
<vanRijn> oh?
<vanRijn> judd: in jpilot you do that?
<judd> Yes