Kristian Austad wrote:

Problem: I want to change the code so that I can access the data in this
file using FileOpen, FileSeek and FileRead insted of simply getting the
handle using DmQueryRecord. Reason: I want more control over the number of
bytes read and where in the file they are read from. DmQueryRecord isn't
flexible enough for my needs. Or are there undiscovered secrets in the
Database Manager that I haven't discovered?


DmQueryRecord just gives you a handle to the data. You CAN have fair control over what you do with that handle. For instance, you can do something like the following...

   MemHandle     recH=DmQueryRecord(db,record);
   UInt8              *recP=MemHandleLock(recH);

   UInt16             offset=0; (or whatever you want)
   UInt16             size=MemHandleSize(recH); (or whatever you want)

   MemMove((UInt8*) <wherever you want the date to go>,recP+offset,size);

   MemHandleUnlock(recH);

This may still not be right for your needs,... but FYI.  Bob.

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

Reply via email to