Thus spoke Judd Montgomery
> dlp_DeleteRecord should work better.

I've tried this too, though the results weren't much better.  I think it's
an issue of procedure - which thing do you do firt, etc.  Should I open the
db, delete records, cleanup, close, reopen, add new records, cleanup,
close, and so forth?

> I'm not exactly sure what you are doing.  Palm has a document someone
> online that explains how their sync algorithm.  They keep 2 copies of

I saw this on another post (though lost the URL now), but I'm not sure that
a "sync" in their terms is what I'm attempting just now.  I just want to be
able to add and delete records on the Pilot.  If I have a record id of an
existing record and I want to delete it, should I be able to do so followed
by adding a new record?  Seems like it, but scenarios like this are what
are causing my problems.

Instinct tells me I'm missing something simple, a procedural issue of some
kind.

> the DB on the desktop.  One matches the pilot at the last sync and the
> other is after modifications from the desktop.  The difference between
> the 2 can be used to figure out what records are new.  There is no
> attribute for a new record.

That may be true, but using dlp_WriteRecord() requires an attribute.  I
tried using 0 for the attribute, but for some reason 0x40 seemed to work
better (fewer data corruptions).

> > dlp_OpenDB()
> > Open file
> > While more records
> >         process a record with dlp_WriteRecord()
> > dlp_CleanUpDatabase()
> > dlp_ResetSyncFlags()
> > dlp_CloseDB()
> > 
> 
> Inside the while you need logic to find the new records from the
> difference between the 2 databases on the desktop (or some other
> logic).  And dlp_deleteRecord().

Not really.  I can actually do that comparison logic somewhere else.
Consider that after the comparison you're left with a 3rd set of data which
can contain records that the desktop has deleted and new records the
desktop has added.  This is the data I'm trying to pass to the Pilot.  I can 
use dlp_DeleteRecord() to delete records, but using dlp_WriteRecord() with the
attribute set to 0x80 (followed by the call to dlp_CleanUpDatabase()
appears to perform the same function.  Then again, maybe it doesn't.  I am,
after all, ending up with a corrupted database.

> Yes.  If you can't find the document on palm's website I can look for it
> for you.

I'll dig around, but if you have a pointer handy please do pass it my way.  
Thanks!

-- 
Michael J. Hammel                               The Graphics Muse 
[EMAIL PROTECTED]                      http://www.graphics-muse.com
------------------------------------------------------------------------------
    One possible reason that things are not going according to plan is that
                there never was a plan.  --  Ashleigh Brilliant
_______________________________________________
Pilot-unix mailing list
[EMAIL PROTECTED]
http://hcirisc.cs.binghamton.edu/mailman/listinfo/pilot-unix

Reply via email to