Hi Henk,
Thanks for your advice I did the same thing how you suggested, but still I
have the problem while displaying the data on the form. The actual problem
is I'm getting some junk characters, where I'm getting the actual
count(number of records in my Address Book), please suggest me I'm new to
the PlamOS programming.
Here is my code :
Err getAddressDatabase()
{
MemHandle mh;
UInt16 cardNo=0;
UInt16 recordNum;
UInt16 index = dmMaxRecordIndex;
short width = 0, height = 5;
UInt16 numdatabases;
Err err =0;
char* pText;
numdatabases= DmNumDatabases(cardNo);
dbvar= DmOpenDatabaseByTypeCreator
(addrDBType,sysFileCAddress,dmModeReadOnly);
recordNum = DmNumRecords(dbvar);
for(index=0;index<recordNum;index++)
{
//mh = DmQueryRecord( dbvar,index );
mh=DmGetRecord(dbvar,index);
pText= (char*)MemHandleLock(mh);
WinDrawChars(pText,StrLen(pText),width,height);
height=height+10;
MemPtrUnlock(pText);
DmReleaseRecord( dbvar, index, true );
}
return err;
}
Thanks in Advance
Srini
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
- Accessing the Address Book data mlv srinivas
- Re: Accessing the Address Book data Henk Jonas
- Re: Accessing the Address Book data mlv srinivas
- Re: Accessing the Address Book data ScottP
- Re: Accessing the Address Book data Miken
