I'm not certain you can just loop through like this.  There may be gaps for
whatevere reason (deleted/archived records, which should always be moved to
the back of the database).  Try using DmQueryNextRecordInCategory and use a
while loop.  You still need to increment the index however one from its
returned value.

Elia

-----Original Message-----
From: Mandar Joshi [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 26, 1999 10:31 PM
To: [EMAIL PROTECTED]
Subject: Why does this fail ??


Hi all,

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);
     }



Reply via email to