Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create customised configuration file?
Message
De
29/06/1999 16:25:19
 
 
À
29/06/1999 16:09:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00235476
Message ID:
00235488
Vues:
23
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform