But you have to check recordHandle for NULL, anyway...

Mandar Joshi wrote:
> 
> I am not deleting / removing any records from palm application.
> My conduit calls SyncPurgeAllRecs(dbHandle) and fills the fresh data.
> I just do the job of reading the records from the palm database.
> 
> >>
> >>
> >> Can somebody throw some light on why this fails when nIterator reaches 12
> >>
> >>     nNumRec = DmNumRecords(AssessmentQuestionDB); // there are 90 records
> in
> >> this database
> >>
> >>      for(nIterator = 0; nIterator < nNumRec; nIterator++)
> >>      {
> >>       recordHandle = DmGetRecord(AssessmentQuestionDB, nIterator);
> >>       recText = MemHandleLock(recordHandle);
> >>       MemHandleUnlock(recordHandle);
> >>       DmReleaseRecord(AssessmentQuestionDB, nIterator, false);
> >>      }
> >
> >Record 12 might have been DmDeleteRocrd()'ed instead of
> DmRemovedRecord()'ed.
> >MemHandleLock will fail in that case as recordHandle is NULL.
> >

Reply via email to