Link to home
Start Free TrialLog in
Avatar of pedro1
pedro1

asked on

Locating a second occurance of text in a paradox 7 db file?

How can I locate a second occurance of lets say for example 'Mike' in a paradox 7 db table after I have found the first occurance of 'Mike'.

Thanks.
Avatar of KE
KE

Are you trying to do a free-text search on a memo, or is it a single field ?
Avatar of pedro1

ASKER

Ill try to make it clearer.
I can use locate on a single field to search for 'Mike'.
The record that has been found is correct but i now want to search further on in the field for the next time that 'Mike' appears within this field. In other words I want a next button to search for the second and maybe more occurances of 'Mike' in the same field. Locate just starts from the beginning again and finds only the first occurance of 'Mike'
Cheers Mike.
ASKER CERTIFIED SOLUTION
Avatar of KE
KE

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pedro1

ASKER

What do you mean 'use next'. Is there a Locatenext command and if so how do I get it to work. I have all the fields indexed.
Is there any chance you can show me some code on how to locate the next occurance of 'Mike' please. I didn't make it too clear that this is the first programming lanuage that I have really tried to learn properly.
michael.ross@cableinet.co.uk
Cheers Mike Ross
Let's say you have a normal table component with table XXX and field YYY that you want to search on. If your table is UNIQUE indexed you can make an additional query with the following SQL statement:
SELECT UNIQUEFIELDNAME, YYY FROM XXX WHERE YYY LIKE "Mike"
Thereby use the results of the query to browse the normal table component - in this case you set the table mastersource to the DataSource of the Query (and link the unique fields), and the index of the table should equal the UNIQUEFIELDNAME in the query.
Hereby you can browse the searched values in the master table by issuing next and prev. statements to the query. When you are finished with the search, disconnect the mastersource of the table.
Hope it was a little clearer this time, sorry !!!