Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the best way to set the starting path?
Message
From
14/01/2005 11:23:42
 
 
To
14/01/2005 07:59:04
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
00977105
Message ID:
00977225
Views:
25
>which parts confusing you?
>
>FoxPro programs fire up directory?!
>Home directory?!
>
>Do you remember how we trace the directory in where the program fire up? This is where my question comes...
>
>Set PATH TO [INSTALLPATH]
>or
>SET PATH TO [DATABASEPATH]
>or
>......
>
>What will you do?!

It all depends on the functional design. Both are plausible. Choose what gives you an advantage.

If the design offers the possibility to switch between datasets, then use:
<close all dataset tables>
SET PATH TO [DATABASEPATH]
<open dataset tables>
If there's no need to switch between datasets, then use 'Set PATH TO [INSTALLPATH]' or even forget that one, because it's probably useless (VFP knows where it is). In this case you will probably specify the datadir as the startup folder in the startup icon.

BTW, put this somewhere on top of your main program::
private gcStartupDir
gcStartupDir = sys(5) + curdir()
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform