Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Foxuser.dbf/fpt

Status
Not open for further replies.

DSummZZZ

Programmer
Oct 24, 2000
4,250
0
0
US
Okay, this one has me stumped.

For the life of me, I cannot figure out how to stop my application from creating FOXUSER.DBF/FPT in the default startup directory.
In fact, while trying to run a VFP version of an .EXE in the same directory as a Fox 2.x version, I get the followinf error:
Code:
"Access denied [i]d:\startup_dir[/i]\FOXUSER.DBF"
when I run the VFP 9 app, even though the file is not opened exclusive. The only way I could get that error to stop was to mark the file read only.

I have a CONFIG.FPW file included in the project which contains RESOURCE=OFF.
Using a standalone CONFIG.FPW file with that command line in it still creates the resource file.

One exe I made didn't create the FOXUSER, but upon exiting produced an error to the tune of "FOXUSER.DBF not found".
I don't want FOXUSER used. I don't even want it even created. But if it is created, I want to ignore it. I know in the past, I was able to have it not created. But it hasn't really been an issue until lately. I'm wondering if there is something wrong in my brain or if anyone else has seen this behavior.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
That config.fpw you have is enough to not create and use it. But it does not only have to be part of the project, it must be marked as included in the compilation.

I can once more refer to my FAQ here: faq184-6512

Besides the main feature to create a single form application with a top level form, it also has a config.fpw and includes it in the project and into compilation.

All I have in that config.fpq is
Code:
SCREEN=OFF
RESOURCE=OFF
ALLOWEXTERNAL=ON
And only the RESOURCE=OFF is needed for the foxuser.dbf suppression. If that still doesn't help, the problem may be, that as you say, you already have a foxuser.dbf for the 2.6 application in the same folder. Also look at any place in your code you SET RESOURCE or use SYS(2005).

Bye, Olaf.
 
Yes, the config.fpw is marked as "included" in the project. But even if there is a standalone config.fpw which is not included in the project but in the startup directory, the FOXUSER.DBF still gets created.

What it boils down to is this:
Start with no FOXUSER.DBF in the directory.
CONFIG.FPW with the line RESOURCE=OFF built in and marked as 'included' in the project, and/or
CONFIG.FPW with the line RESOURCE=OFF in the startup directory.
FOXUSER.DBF gets created.
If I issue the command SET RESOURCE OFF in code, I get an error "Foxuser.DBF not found".

Is it possible service pack 2 or one of the later patches could be causing this?


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
I haven't seen this behaviour in any version of VFP. RESOURCE=OFF is unmistakably telling VFP to not create a foxuser.dbf, unless you specify to use a certain foxuser.dbf via command line parameter. Do you start with any command line parameters? Encoded within a start link, perhaps?

What should exclude any possibility to override the RESOURCE=OFF is to include ALLOWEXTERNAL=OFF. This makes VFP ignore any outside setting.

Also: Have you looked, if the internal file is called config.fpw, not config.fpw.txt? And is there no second fpw file in the project?

Bye, Olaf.
 
I have never seen this behavior before either. It is confusing.

You know, I even tried ALLOWEXTERNAL=OFF, thinking that if there was any config.fpw anywhere in the search path it would surely ignore it. No help.
As for config.fpw.txt, I know that isn't the case. I always have my settings set to display file extensions in Explorer.
And no, there are no command line parameters. I am running the app just by double-clicking directly in the startup folder.

Oh well. I guess as long as it works, it's not that big of a deal. I just hate not knowing.

Thanks for your ideas though.



-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Well, then you have to live with it, perhaps. Installing a predefined Foxuser.dbf at least you don't need to allow users to create files in the application directory.

Keeps me puzzled, though.

Bye, Olaf.
 
Just stating the obvious, after adding ALLOWEXTERNAL=OFF you did recompile and replace the EXE in the application folder?

The last step might be tricky, if you have the EXE in a protected system folder like program files. With UAC turned on, you'd not overwrite the EXE, but the new EXE would be redirected to a VirtualStore subfolder of your user profile.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top