Post DatosCliente, and it might be more obvious.

"Nicolas Raitman" <[EMAIL PROTECTED]> wrote in message
news:37421@palm-dev-forum...
>
> Hi to all. I am having some problems when attempting to read some records
> from a Database. The Database consists on:
> Cliente (char *) NCliente (UInt16).
> I have the following routine in order to read it but I have no luck in
doing
> it good. I will appreciate any help.
>
> static DmOpenRef  AddressDB;
> static LocalID  AddressDBID;
> static UInt16   nRecords;
> static UInt16   TableRows;
> static TablePtr  pTable;
> static UInt16  recordNum;
> static Err   err;
> static MemHandle mHandle;
> static char   sz[120];
> static UInt16  i;
>
>
>
> AddressDBID = DmFindDatabase(0, "COMPOSICION");
> AddressDB = DmOpenDatabase(0, AddressDBID, dmModeReadOnly);
> nRecords = DmNumRecords(AddressDB);
>
>   for (i = 0; i < nRecords; i++)
> {
>
>
>   mHandle = (MemHandle) DmGetRecord (AddressDB, i);
>
>   if (mHandle)
>
>
>    Cliente = (DatosCliente *) MemHandleLock (mHandle);
>    StrPrintF(sz, "%s %d", Cliente->Nombre, Cliente->NCliente);
>    FrmCustomAlert(CustomAlert, sz, "","");
>   }
>
>   MemHandleUnlock(mHandle);
>   DmReleaseRecord(AddressDB, i, false);
> }
>
> DmCloseDatabase(AddressDB);
>
> }
>
> When I see the alert I can see perfectly well the Cliente->Cliente but not
> Cliente->NCliente, what I am doing wrong?
> Thanks,
> Nicolas
>
>
>



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

Reply via email to