You don't need to index every time you want to seek. At least, not in a table; the indexes are permanent in that case. (With a view, you have to create the index every time you create the view.)
Typical commands for searching would be like this:
use MyTable
select MyTable
set order to abc
seek m.SearchValue
if found()
...
endif
Specifying the ORDER when you open the file, as you showed, is also correct (use ... order ...)
However, doing a SEEK or SEEK() before specifying the index will give you the error "Table has no index order set". Without an index, you can still do a search without an index, with the LOCATE command. The result is usually slower, but you can search on any condition.
>Naomi
>
>I have tried it but am getting an error message," Table has no index order set". I have used the line
>
>
>Index on bcode to mcode
>
>
>I have also tried by this
>
>
>Use bcode order mcode
>
>
>But when I am using the following command in the style of old foxdos, every thing is perfect.
> ...
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)