I've been trying to modify the attributes of individual records in order to
attempt to delete and add new records using dlp_WriteRecord().  It doesn't
work quite right for some reason, but this is what I have so far.

You must set the RecordID to 0 *and* set the attribute to modified (0x40)
to add a new record.
You must set the Attribute to deleted (0x80) to delete the record and then
run dlp_CleanUpDatabase() to actually remove the record from the Pilot.

My problem is that if I read in a file of records to process that includes
both deleted and modified records *and* new records, my db on the Pilot gets 
messed up.  The process I use is:

dlp_OpenDB()
Open file
While more records
        process a record with dlp_WriteRecord()
dlp_CleanUpDatabase()
dlp_ResetSyncFlags()
dlp_CloseDB()

I'm using the 0.9.3 libpisock though 0.9.5 appears to have the same code in 
this case (I haven't tried plugging it into my application though).  Is
there a known issue with how records should be deleted and/or added when
processed during the same session as records that are modified?


Note to list owners:
After some unexplained delay, I seem to be getting pilot-unix mailings now.
I signed up for the digest, but that never showed up so I went back and
changed it to non-digets form and messages have started to trickle in.
I'm not sure but it looks like the digest may not send out anything till it
gets a certain number of messages.  Anyway, just thought I'd pass that
along just in case there might be some problem.

-- 
Michael J. Hammel                               The Graphics Muse 
[EMAIL PROTECTED]                      http://www.graphics-muse.com
------------------------------------------------------------------------------
Vision is the ability to see potential in the work of others.
Robert X. Cringley, "Accidental Empires"
_______________________________________________
Pilot-unix mailing list
[EMAIL PROTECTED]
http://hcirisc.cs.binghamton.edu/mailman/listinfo/pilot-unix

Reply via email to