Running on POSE 2.0b3, PalmOS 3.0... using CW/Palm R5 for Win...
I have the following bit of code:

    void foo(DmOpenRef dbRef, UInt index)
    {
        UInt    insertAt = index;
        MyType  data;

        hRec = DmNewRecord(dbRef, &insertAt, sizeof(data));

        /* fill data, DmWrite to hRec */
    }

I am pretty sure that dbRef is a valid, empty, open database.  The first
time this function is called, index == 0.

When run, I get the following assertion during the call to DmNewRecord():

    DataMgr.c : line 4027, Err creating new rec


So I tried replacing the DmNewRecord() call with a pair of other calls:

        hRec = DmNewHandle(dbRef, sizeof(data));
        if (hRec) {
            /* fill data, DmWrite to hRec -- all works ok */

            DmAttachRecord(db, &insertAt, hRec, NULL);
        }

which gives the following assertion during the call to DmAttachRecord():

    DataMgr.c : line 2888, Err attaching rec


So, obviously, my question is what possible reasons might I not be able to
attach a record to a newly created, valid, empty database?  Is there a
minimum for sizeof(data)?

Thanks...

---- --- -- -
Matthew D Moss
[EMAIL PROTECTED]



Reply via email to