John Would you be better using filters and OnFilterRecord?
Neven > I am trying to make a generalised routine for searching a client dataset (it > searches alpha fields matching a user supplied string and positions on the > next matching record). > > So far I am doing this using the locate command like: > > if > cdsFind.locate(FindFieldName,FindString,[loPartialKey,loCaseInsensitive]) > then > > > 2 questions: > > Q1 - loPartialKey matches from the beginning of the alpha field text, is > there anyway to search anywhere within the alpha field not just match at > the begininng? > > Q2 - I would like to do the locate on several alpha fields - having trouble > getting the locate sysntax to work for several fields (variant arrays). I > have examples how to do it locating one of several constant strings (using > VarArrayOf to make the second parameter as a variant array), but not for one > string that is in a variable. Does anyonehave a working example of locate > on multiple fields finding contents of a string variable. > > Notes: > > -When I get this working happy to share it > > - I have to do this with something like locate that doesn't change the recno > until done, as the scroll event is slow for some datasets I want to use it > on. > > > > John > > _______________________________________________ > NZ Borland Developers Group - Delphi mailing list > Post: delphi@delphi.org.nz > Admin: http://delphi.org.nz/mailman/listinfo/delphi > Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe > > > _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe