I'm having problems _updating_ the contents of an existing record in my
database.
I've looked through the archives on this one and found a post that talked
about
using DmAttachRecord along with the regular DB Manager functions to make
this
happen.

[from the archive snip....]

Another alternative to modify an existing record is to:

1) Use DmNewHandle to create a chunk to contain the new contents of the
record.
2) Use MemHandleLock, DmWrite, and MemHandleUnlock to fill in the contents
of the new record.
3) Use DmAttachRecord to put replace an existing record with the new one.
4) Use MemHandleFree to free the chunk with the old contents of the record.

The advantage of this approach is that it's less likely to corrupt the
database if the process is interrupted, whether due to a bug or the user
forcing a reset. You can find examples of both approaches in the PIM apps

[/from the archive snip...]

I've implemented this and I still get two copies of my record - the new one
and the
old one with the same name.

Any suggestions?

Also, Danny's post referenced the source code for the PIM apps in the
SDK...I have
the SDK, but where is the source code for the examples?

Thanks!

John



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

Reply via email to