Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Main program
Message
From
09/05/2001 16:45:02
 
 
To
09/05/2001 15:43:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00505502
Message ID:
00505527
Views:
28
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
Previous
Reply
Map
View

Click here to load this message in the networking platform