Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Path management
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00681846
Message ID:
00681882
Views:
19
I worked on a project like that a year of 2 ago. We needed for testing purpose to have data in different directories, add total flexibility for th various locations where the software was installed. There was no simple solution -some of the things were

The primary procedure allowed passing a parameter contining the main data file. So the short cut to the application on the end users machine could be set up to do this, and the install procedure set it up for him.

procedure main
lparameters pDirCommon

This parameter was optional so that it would default to the start directory of the program

if empty(pDirCommon)
gDir_Common=sys(5)+sys(2003)
else
gDir_Common=pDirCommon
endif
set path to (gDir_Common)

Then it picked up an INI file from that directory

gDir_INIfile=''
Fname=gDir_Common+'\xxx.INI'
If file(Fname)
gDir_INIfile=gDir_Common
endif

The INI file could contain additional information on other directories where data was held.

All the above covered locations of files common to all users, and they could then be located anywhere, but could only be changed by the administrator.

And to make it ultimately flexible, each user of the system, could have his own sets of files located anywhere he wanted. In the user table login table, the users data path was held.

When a new user was created, it copied a starter set of files togther with it's DBC into that directory. This approach required 3 different sets of tables each with it's own DBC, and some prgramming to modify the DBC on the fly. Also required specific open and closes of DBC's in different areas as users logged in and out.
Previous
Reply
Map
View

Click here to load this message in the networking platform