Board index » delphi » multiple record locates?

multiple record locates?

i'm trying to do a search in a paradox 5 table using delphi 2.0. the
locate function works great for finding the first record but i need to
find all the records with a specific string in it.  a messagedlg box
will prompt the user if they want to stop or continue searching.  what
function can i use to find the next, next, next, ...,  record with a
string?

darrin
--
Please reply by post and e-mail or just e-mail.

 

Re:multiple record locates?


On Mon, 11 Aug 1997 23:23:39 -0600, laserjet <laser...@concentric.net>
wrote:

Hi  Darrin,

Try using a TQuery to return the required result set of records e.g.
select * from table_name where field_to_look_in like '%text%'
(where text is the string to search for)

Best Regards
Jonathan Jones
Email jjo...@ambr.demon.co.uk

Quote
>i'm trying to do a search in a paradox 5 table using delphi 2.0. the
>locate function works great for finding the first record but i need to
>find all the records with a specific string in it.  a messagedlg box
>will prompt the user if they want to stop or continue searching.  what
>function can i use to find the next, next, next, ...,  record with a
>string?

>darrin
>--
>Please reply by post and e-mail or just e-mail.

Re:multiple record locates?


Hi Darrin,

Two options:
1) Use an sql statement, e.g. select * from mytable where name like 'Fred%'
2) Use a filter, e.g. name >= 'Fred' and name <= 'Fred~'

Good luck,
 Mic...@trc-benelux.nl

Other Threads