Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem finding table if user changes directory
Message
From
03/05/2000 04:03:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
02/05/2000 12:08:00
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00365128
Message ID:
00365496
Views:
18
>I am trying to give the user the flexibilty of choosing their own directory and since I have no idea what they will choose I can't issue a set path command. The startup directory is currently the directory I developed it in (not always the directory chosen by the user).


Michael,
Provided your dbc and dbf keep their realtie path to each other (generally they're in same dir) you can move them to any location and use from there. In the very first lines of your program before attempting to open a member of dbc have a routine to check existing path settings. If there is set path to there. If doesn't exist get path from user, save it in in registry, ini file, mem file, free table whatever you prefer.
As a side note to Eric's sugestion, be carefull with sys(2004). In a distributed exe file what you get is not where exe reside but vfp runtime dll which is nearly always windir\system. OTOH you could get exe startup dir with fullpath(program(0)).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform