Hi,
Here I am getting problem with StrCat(); function
whenever I am using this Function I am getting the Error
like
" Null String passed"
I am sending tha code here please go through.
I am declare the "errBuff" as global variable
char *errBuff[50];
static void MainFormInit()
{
FormPtr frm;
ListPtr lst;
UInt numRecords;
frm=FrmGetActiveForm();
numRecords=DmNumRecords(DrugDB);
int recnum = numRecords/40;
CharPtr tempStr,test;
char *test1[50];
int i,j=0,tempInt,xx=0;
int xx0=1;
Handle recHandle1;
CharPtr recText1,str1;
lst=(ListType *)FrmGetObjectPtr(frm,FrmGetObjectIndex(frm,MainUnnamed1001List));
for(i=0;i<recnum;i++)
{
//Retrive information from database
recHandle1=(char **)DmGetRecord(DrugDB,xx0);
recText1=(char *)MemHandleLock(recHandle1);
str1=recText1;
MemHandleUnlock(recHandle1);
DmReleaseRecord(DrugDB,xx0, false);
items1[j]=str1;
StrCopy(errBuff[j],", ");
StrCat(errBuff[j],str1);
ErrDisplay(errBuff[j]);
j=j+1;
xx0=xx0+40;
}
LstSetListChoices(lst,errBuff,recnum);
LstDrawList(lst);
}
any one have idea please tell me.
-------
_____________________________________________________________
Get Your Free ScanMail and Email At http://www.bharatmail.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/