Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sys(2019) returns Empty String if config.fpw is in proje
Message
From
11/02/2003 11:39:54
 
 
To
11/02/2003 00:41:04
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00751778
Message ID:
00751912
Views:
29
I think I know why this has changed.

In VFP8, we allow an external config file to be read even if there is an internal config file built into your exe. The external config file is only searched for (and loaded if found) if the internal file contains the following line:
ALLOWEXTERNAL = ON
Items in the external file take precedence if there are any duplicate entries.

See the "Special Terms for Configuration Files" help topic for more info on ALLOWEXTERNAL.

So for VFP8, it looks like SYS(2019) returns "" if there is no external config file, regardless of if there is an internal file.

How do you think it should behave?

Perhaps it should return the internal file if there is no ALLOWEXTERNAL = ON in the internal file, as there would be no possiblity of reading an external file.

I am not sure this is a bug, but I'll pass it up the line for a look.

Thanks!

>Not sure if this is a fix in VFP8 or not, but this behavior has changed and it took me a little while to figure it out, so I'll share it... In VFP7 if you include your config.fpw in the project, which ends up being embedded in the .exe, the sys(2019) would return the name of the config file used. Now in VFP8 it returns an Empty string, eventhough it "is" using the config.fpw embedded in the .exe. So now if you want to test if a config.fpw file was used and you included it in your project, you have to do something else, like maybe set something in the config.fpw and test for that instead of using sys(2019).
>
>Mark
Jim Saunders
Microsoft
This posting is provided “AS IS”, with no warranties, and confers no rights.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform