Thanks guys for your advice on this problem and no thanks to the authors for not
covering this important part of dealing with a database- ie how to display the
info.

Actually I have already stripped down the Memo sample and got it working though
under another name and creator so as not to conflict with the inbuilt memo and
would eventually get to the truth.

Cheers

Barry

On 26/05/2004 at 17:05, [EMAIL PROTECTED] (Baxter) wrote:

> DmQueryRecord returns a handle.  When you lock that handle, you get a Memory
> Pointer - essentially a void*.  Simply cast it to whatever you need.
> 
> The code in your previous message was in error.
> 
>    WChar   textP;
> 
>     recordH = DmGetRecord(gDatabase, index);
>     record = MemHandleLock(recordH);
>     StrCopy(textP, record);
> 
> Should be:
> 
>    Char* textP;      // note:  this is just a pointer, you need to reserve
> space.
>    textP = MemPtrNew(size);
> 
>    // or:   Char textP[size];
> 
>     MemHandle recordH = DmGetRecord(gDatabase, index);
>     Char* record = (Char*)MemHandleLock(recordH);
>     StrCopy(textP, record);
> 
> -- 
> -------------------------------------------------------------------------
> Free software  - Baxter Codeworks  www.baxcode.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