Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Main program
Message
De
09/05/2001 16:45:02
 
 
À
09/05/2001 15:43:56
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00505502
Message ID:
00505527
Vues:
30
Steven,
You have a lot of options. The easiest is to develop your app with the following hierarchy. That way all of the files have the same relative path and the app should always find them.
drive:\myapp
drive:\myapp\data
drive:\myapp\reports etc.
You could also have the app check for the data in your default directory upon start up and if not found, prompt the user to specify where it was installed. Then store this value to a table and reference it each time the app is run before checking for the data. This will cause the user to find the location only once and again only when they have moved the data to a different directory.
sele 1
use ref.dbf
set path to ref.mypath
IF file('somefile.dbf')
ELSE
  lcpath = getdir()
  set path to lcpath
  sele ref.dbf
  replace mypath with lcpath
ENDIF
You could use several more complex solutions if these don't work for you by setting up a configuration file which will check for and prompt for data directories.

HTH
Mike
Here's to alcohol...the cause of ... and solution to ... all of life's problems - - Homer J. Simpson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform