Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resource files
Message
From
17/07/2006 16:37:34
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01136594
Message ID:
01137055
Views:
26
>>>>I'm getting old I know, so I don't remember things as well as I used to, but didn't VFP used to automatically create the resource files foxuser.dbf and foxuser.fpt if they didn't exist? I'm sure I used to inadvertantly get them created on my desktop and then have to delete them. But now they don't seem to get created and I get an error when I "SET RESOURCE ON" if they don't exist. Am I missing something or has the fox behavior changed? Does it all have to be done manually now?
>>>
>>>Try to set in config.fpw
>>>
RESOURCE=ON
>>
>>I tried this and it makes no difference. Isn't VFP supposed to create foxuser.dbf automatically if it doesn't exit or am I imagining things?
>
>Does
? SET("RESOURCE",1)
point to a correct folder with write access?

Arrgh! Sorry to be such a lunkhead. Perhaps I'm just not being clear. My problem does not exist with the development version of VFP. It is with a compiled EXE installed on the user's PC with VFP runtime. The main program STARTUP.prg contains:
clear all
clear
close tables all
if _vfp.startmode <> 0
	_screen.visible = .f.
else
	_screen.visible = .t.
endif
set reportbehavior 90
set exclusive off
set hours to 24
set deleted on
set exact on
set ansi off
set resource on
The installation does not use a config file. None of my applications do. When run on the user's PC the program crashes with an error on the last line to the effect that it cannot open ...\foxuser.dbf. It is properly pointing to the installation folder. Thus I cannot issue
? SET("RESOURCE",1)
because the program will not start. I tested your first suggestion by creating a config.fpw text file with
RESOURCE=ON
in the installation folder but I still got the error stating the foxuser.dbf could not be found. Based on past experience, I thought that if fox couldn't find it , it would create it automatically. But I guess I'm wrong. I can solve the problem by manually placing a copy of foxuser.dbf in the startup directory but that doesn't explain the behavior.

In the development environment there is no problem because there is a copy of foxuser.dbf that it finds and opens.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform