Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coding for Peer to Peer networks
Message
 
 
To
20/04/2001 12:20:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00497969
Message ID:
00501143
Views:
21
>Until now most of my apps have been developed for server based LAN use, but now one of my apps is being used on a peer to peer network where the users map each others drives with their own drive letter designation. This means that hard coded references to file locations no longer works.
>I know that there is more than one approach to addressing this issue and I was wondering what is the currently recommended "guru" method.

Hey Sam. Determine the current path where the app is by using sys(2004). Store this in a sting and use it to open all of your tables and make other references.

lcPath = sys(2004)
dbpath = lcpath + "data\"

use dbpath + "trains" in 0
use dbpath + "tracks" in 0
use dbpath + "tickets" in 0

Then you never have to worry about which drive your app is on or the user has mapped.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform