Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create customised configuration file?
Message
From
29/06/1999 16:25:19
 
 
To
29/06/1999 16:09:35
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00235476
Message ID:
00235488
Views:
22
>I want to use a customised configuration file (.FPW) with my VFP6 application.
>Currently the searchpaths to my tables are hardcoded into my project's .PRG files.
>I want the config file to assign the searchpaths of my tables to public variables, so that if in the event of my data having to be
>moved to a different directory,all I need do is change the paths in my .FPW and ask users to login again - thereby avoiding the
>issue of making the changes to my .PRGs, and rebuilding the .EXE.
>Any ideas how this can be done?
>Your suggestions are most appreciated.

PATH= is a valid parameter in CONFIG.FPW. When the app starts for the first time, ask the user where the data files reside. Read CONFIG.FPW into a temporary table with one field (C,256), delete the original PATH=, add a new PATH= with the new path name, then copy the table to CONFIG.FPW type SDF. Initialize the new path with SET PATH TO or the user can shutdown and restart.

HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform