Hy all!

I'm getting some dificulties to open a record from a db that was created by
palmdb.dll. I can't put it on a struct. The database contain recs that have
3 Char variable lenght fields. This the code, that works very well when is
used with recs that is created by the device (using DmWrite).

typedef struct {
    Char Text1[6];
    Chat Text2[15];
    Char Text3[20];
} StructTest


void testfunc()
{

    DmOpenRef DbPtrF;
    LocalID dbID;
    MemHandle rh;
    StructTest *rp;

    ... Open database normaly...

    //Try to get the record...
    rh = DmQueryRecord(DbPtrF, 0);
    rp = MemHandleLock(rh);

    {
        Char *a, *b, *c;
        a = rp->Text1;
        b = rp->Text2;
        c = rp->Text3;
        //Here the pointers a,b,c should have the content of the record...
But this don't hapen.
    }


..Release the pointers and Closes the database...

return;
}


Does anybody can see what am I doing wrong?

Thanks!

Regis



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

Reply via email to