Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding path to data
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00887854
Message ID:
00887921
Views:
6
>My exe is in the same directory as the data on a server. I have a shortcut on my desktop that starts the exe. Unless I fill in the "start in" with the same directory my exe cannot find the data. To avoid this I open the data with the full path. To get the full path to the data I use...
>
>
>StartDir=JUSTPATH(sys(16))+'\'
>
>use (StartDir + 'mydbc!mytable') in 0 shared
>
>
>Is there a way that is generally accepted as better than this?

I typically use
SET PATH TO DataPathHere
* where the actual DataPathHere may be coming from the INI file 
* or registry key or even hardcoded in simple cases.
...
USE whatever_table
If all the data is always in one folder, then "start in" field in the shortcut should be good enough.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform