DmFindSortPosition is designed to return the last one (actually, i think it
return the insert position, which is one past the last one).

if you want to find the first occurrence then you must either write your own
binary search function, or walk backwards from the position returned by
DmFindSortPosition.


----- Original Message -----
From: Elia J. Freedman <[EMAIL PROTECTED]>
> There doesn't seem to be a search routine for databases.  I have used the
> find sort position but that returns the last occurrence rather than the
> first.
>
> For instance, if I was searching through a database that contained a
series
> of text strings, and was looking for the first occurrence of "A", and the
> list was as follows:
>
> Apple
> Apple Cobbler
> Apple Pie
>
> I would get back "Apple Pie" with find sort position when I need "Apple".
>
> Are people just writing their own search routines or am I missing an
> appropriate function call?


Reply via email to