>Ever since FPW 2.6 (to now VFP 6.0), in the main.prg, I always used SET DEFAULT TO, like the following:
>
>USE dirpath
>STORE dirpath TO dirpath
>SET DEFAULT TO &dirpath
>USE
>
>We use O:\ (read-only) for all the executables and P:\ (read/write) for databases\tables (not my idea, but thats the way it is here), so I need to direct the execute file to where the data are... What would be different (or better or safer or whatever) if I did the following:
>
>USE dirpath
>STORE dirpath TO dirpath
>SET PATH TO &dirpath
>USE
IMHO, SET PATH is the preferrable way. Also there may be a combination of them: SET DEFAULT sets the start directory (for example, if it should be different from the directory where your EXE starts, or if you have multiple data sets) and SET PATH provides access to all necessary files.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison