>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement