Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Config file and Path
Message
From
15/09/2003 02:32:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
13/09/2003 12:41:56
Jim Crowder
Progressive Group Alliance
Boise, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00828761
Message ID:
00828901
Views:
12
>I am having a difficult time figuring out how an application I have taken over is figuring out where the data is. Currently have two folders , APP A and APP B. APP A contains the Project and ALL Files. APP B contains a data folder. If I compile the app from APP A and move the EXE to APP B, it appears to still be accessing data in APP A.
>
>Can not find any SET PATH or similar statements in the Main.Prg. There is a CONFIG.FPW file located in the folder where the EXE lives, but if I change the PATH=data,data; statement to something else, ie PATH=junk,junk; it still seems to work. I know its using this config file because SYS(2019) says so.
>
>HELP??

Jim,
If forms have dataenvironments, any cursor added to DE hardcodes its path (in cursor database and cursorSource properties). Therefore no matter where you move the exe on your harddisk(s) and with or w/o a set path it'd still find the original location of the tables and use from there.
You might change the database and cursorsource properties in code but it's cumbersome.

If you rename original data folder (app a \data) to anything then VFP locates the tables using default and then search path. This is the simpliest solution. Have your config.fpw set the path for your new location. ie:

PATH=junk; && why a second junk in your sample?

and rename 'app a\data' folder to something else (ie: datax).

Note that it's a relative pathing. VFP would locate the tables from :
app b and app b\junk folders.

PS: Instead of a config.fpw you might get and set the path when the app starts.
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