Hope this piece of code will solve your problem.

Err GetRecordIndex (DmOpenRef db, Word category, Word recno, Word
*recIndexP)
{
 Err error = 0;

 *recIndexP = 0;
 error = DmSeekRecordInCategory (db, recIndexP, 0,\
  dmSeekForward, category);

 if ( error )
 {
  DisplayAlert("error1: get record index",ALERT_ERROR);
  return error ;
 }

 error = DmSeekRecordInCategory (db, recIndexP, recno,\
  dmSeekForward, category);

 if ( error )
 {
  DisplayAlert("error2: get record index",ALERT_ERROR);
  return error;

 }

 return 0;

}



Raja Sekhar

----- Original Message -----
From: Michael S. Davis <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 21, 1999 4:25 AM
Subject: Database Index of Record within a Category ? How


>
> I posted this question before but did not see it show up
> on the list.
>
> I am having a problem understanding how to find the index
> of a record within a database (so that I can delete the
> record).
>
> The record will be selected from a subset (category).
>
> So, the item might be item 4 in the category but might be
> 100 in the database.
>
> How do I get the index of the item within the category?
>
> I have looked at DmPositionInCategory but that appears to
> return the number of the item in the list (ie. 4 above).  It
> does not appear to return the index within the entire
> database.
>
> Can someone explain this and how I get the index?
>
>
>
>
>


Reply via email to