Hi everyone, evetime i open my VFP program, it slways shows this message .... "The resource file is not valid, overwrite it with a new one" i reasearched but i dont see any answers... please help... thanks...
Everytime you have an EXE built with VFP and start it, it'll create a foxuser.dbf (and fpt) and that can become corrupt/invalid.
You can simply delete it.
I wouldn't delete the foxuser.dbf that's used by VFP itself, though, unless it's the one that becomes invalid.
There's a possible line in a config.fpw file (for VFP itself or your PJX): RESOURCE=OFF. That instructs the runtime to neither search for nor create a foxuser.dbf, unless..., well, let's not go that deep here, I mention it so you see why it's called "the resource file". The origin is in that config option. Also related are SET RESOURCE ON/OFF, SYS(2005) and in the options, file locations tab in the list of system files you find the Fiel Type "Resource File".
It's really an unfortunate name as most developers think of resource dlls (or assemblies now) that contain things like images, icons, user interface text strings or other such resources of an application.
But there you have some hints and searching resource file in the help could also have led you there.
Mandy, you wrote, "evetime i open my VFP program, it slways shows this message ...". When you say "my" program, do you mean a program that you have written in VFP? In other words, a compiled executable?
If so, then you should do as Chris suggested, and place [tt]RESOURCE = OFF[/tt] in the config.fpw file. If you don't have a config.fpw file, create one and place it in the root directory of your application (which is probably the directory containing your main program).
Once you have done that, your application will no longer try to find the resource file, and won't create it if it can't find it. That will cause you absolutely no problem, as the resource file usually only contains settings that are relevant to the development environment.
If on the other hand, you are seeing the message when you fire up Visual FoxPro itself, you can simply answer Yes when it offers to recreate the file. If the problem persists, check the location where it is trying to create the file. To do so, go to Tools / Options / File Locations, and scroll down to Resource File. Make sure that the directory you are seeing there is valid. Ideally, it should NOT be a directory under Program Files.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Indeed the error occurred to me several times in VFP9.exe itself, the default location VFP uses is your profile, your roaming profile to be precise, something like
c:\users\MandyC\appdata\roaming\microsoft\visual foxpro 9\foxuser.dbf
And that is a directory that a) belongs to you and you only and b) is readwritable, not like the default system folder of VFP in C:\Program Files (x86), if you don't pick another installation directory.
It still repeatedly occurred and After some time such hickups disappeared.
Its also not that important to VFP itself. Main settings you do in options are stored in the registry. An example of unimportant foxuser data is columns and their order in browse windows related to some alias, if you use BROWSE LAST, it'll open up a browse in the last configuration you used for a certain alias. I would need to look up what important settings are in there. Many people I think have their windows arrangements they like for best productivity.
I just looked at the file locations Resource File and if you click Modify when having this line selected in the file locations list, you can check (or uncheck) Use Resource file. If you do so and click Set as Default you will see what's the difference and could also go back to it when reactivating it. After fixing the dbf, of course.
Hi Mike and Chriss... im actually opening the Visual Foxpro itself... i tried looking at the tools amd setting the location for foxuser.dbf and clicking the set as default button, but still when i open the VFP program, it stills shows the same error.... thanks....
Just checking the location isn't Program Files doesn't fix it.
It will only be replaced by a good version if you delete it.
Or, as I told, uncheck the "Use Resource File" option. Then "Set as Default".
Set As Default isn't helping in itself, if nothing actually changes.
You can also set a new file location and then VFP creates a new foxuser.dbf at next start there and you can try and put back essential records of your invalid old foxúser.dbf
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.