Hi

Im having trouble with DmSeekRecordInCategory  and DmGetRecord.

The call to DmSeek... returns 514

The DmGetRecord then produces and index out of range error.
if keep pressing debug i eventually get "Err Getting Record".

What could be causing this?
Is the DmSeek... return value a possible return value or is it an error
code?
How should i handle this kind of error?

part of my code
...
MemHandle FishGetFish ( UInt16 uIndex )
{
     Err  err;
     s_recordNum = 0;

     err = DmSeekRecordInCategory ( s_dbFish, &s_recordNum, uIndex,
dmSeekForward, dmAllCategories);
     // Returns a value of 514

     // It produces an index out of range error at this point.
     s_hRec = (MemHandle) DmGetRecord ( s_dbFish, s_recordNum);

      if (s_hRec)
      {
           // Lock it down and get a ptr
           s_pText = (Char*) MemHandleLock (s_hRec);
           // s_pText is a global
      }
      return s_hRec;
}


...

Thanks
--
Emile Swain
* * * * * * * * * * * *
Creative Developer
www.AKQA.com
* * * * * ** * * * * * *



-- 
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