I'm tryigng to read the first record of a databse.... i tried many tims ad nothing work..
can someno explain me how to do that
statrting form open the databse.. i'm new on palm programing

i dit this:

img = DmOpenDatabaseByTypeCreator('IMGD','MOST',dmModeReadWrite);

// Get a handle for the first record.
recHandle = DmGetRecord(img, 0);
// Lock down the handle and get a pointer to the record data.
recbyte = MemHandleLock(recHandle);
// Allocate a new memory chunk that will contain a copy of the data.
newHandle = MemHandleNew(StrLen(recbyte) + 1);
// Lock down the handle and get a pointer to the memory chunk.
memrec = MemHandleLock(newHandle);
// Copy the data from the record to the new memory chunk.
StrCopy(memrec, recbyte);
// Unlock the new memory chunk.
MemHandleUnlock(newHandle);
MemHandleUnlock(recHandle);
MemHandleUnlock(memrec);


it was suposed to get all the first record in the memory area handled by memrec...

can somenone tell me how to do that??
cause i need to read the record byte by byte

thnx a lot

_________________________________________________________________
MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com


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

Reply via email to