>I always have index keys even I use Locate, I thought VFP will use the index keys for the Locate as well.
Yes, VFP will use indexes to optimize LOCATE but it decides what indexes to use not programmer.
>in case I want to change to Seek, what should I define? I guess it should be:
>
>select stock
>set index to stockidYes, in case of SEEK you explicitly set index for SEEK to use.
I wouldn't recomend to change your code to SEEK unless it's slow.
>then if I change to MySQL, should I change all the code?You'll have to change your code. How much will depends on how your code is written and what method(s) you'll use to access MySQL.
--sb--