Hope this piece of code solve your problem in getting the record index.
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;
}
Wish you a prosperous happy new year.
Raja Sekhar
----- Original Message -----
From: Mike Davis <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 21, 1999 5:08 AM
Subject: How to find Index of Record?
> I have a list of records within a category, say 5 total.
>
> Now, I want to delete the 4th record, in this list, from the
> database. But that record is not at index 4 in the database, I
> don't think. It might be 20, or 40 or 100.
>
> How do I find the index, to use in DmDeleteRecord?
>
> I have looked at DmQueryNextInCategory but that would require
> some kind of loop. DmQueryNextInCategory (docs) suggest using
> DmPositionInCategory but that returns the position in my list
> assuming I know the index. I already know the position in the
> list it is the index I need to find.
>
> Can someone help explain this?
>
> Thanks
>
>
> --
> -----------------------------------------------------------------
> Discussion Group: http://www.halcyon.com/ipscone/wwwboard/
>
> Protect your constitutional rights. Your favorite one may be next!
> -----------------------------------------------------------------
>
>
>