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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Foxpro compiling dbf's on open

Status
Not open for further replies.

Jeff80

Programmer
Aug 18, 2005
9
0
0
US
I recently had to reinstall Foxpro 9.0 on one of our computers, and now it is doing something strange. Any time I try to open a DBF file by double-clicking on it, Foxpro comes up with an error saying that "<filename>.fxp is not an object file." For some reason, Foxpro is attempting to compile the file upon double-clicking it then failing to do so because it's a dbf, of course.

How can I change this setting? I've gone through Foxpro's options many times, and haven't found anything for this.
 
Jeff,

It sounds like Foxpro is trying to run a startup program -- perhaps one specified in your Config.FPW file, or in the Startup Program entry in Tools / Options / File Locations.

Check to see if there is a program specified in one of those places. If there is, either recompile it or delete any FXP files you find for it.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks for the reply. I checked both locations. There is nothing under Tools > Options > File Locations > Startup Program. The file config.fpw only has the content: "screen=off"

If you have any other ideas, please post them.
 
Does it really say <filename>.fxp? Or does it have an actual file name? I don't believe any native VFP error message has angle brackets.

pamela
 
No, it doesn't. I was just using <filename> as a placeholder. It says something like "test.fxp is not an object file." when I try to open test.dbf
 
Are there any events associated with the DBC container? i.e. Open Stored Procedures for the dbc and see if there is a procedure called "dbc_BeforeOpenTable(cTableName)".
Also check in Stored Procedures, any procedures that are being used for Default Values, Rules etc.

The only error you should see a "...not a table..." if the dbf is corrupted. Not a ".FXP" extension on a table operation.
 
Check out in your operating system:
My Computer->Tools-->folder options-->file types and check if DBF is a registered Visual Foxpro table.

It should open with Microsot Visual Foxpro 9.0 as shown in the extended information "Details for DBF extention" under the selection list when you highlight DBF
 
The startup settings for VFP are saved in a file named FOXUSER.DBF.

Do a search on the computer and deleted all the FOXUSER.* files in folders that are not directly related to an application.
IE. \program file\microsoft\VFP9\...
or \Documents and Settings\.........

If this file does not exist when VFP starts, VFP will create it so there is not problem deleteing it.

However, I believe, the problem is a windows setting problem.

David W. Grewe Dave
 
I got it fixed. Somehow, the default settings for the file extension DBF had been changed. I was able to click "Restore" on it, and now it works fine.

Thanks for all the help.
 
Glad you got it figured out...
Just out of curiosity, how does a file setting “magically” change. What would cause it?
 

Just out of curiosity, how does a file setting “magically” change. What would cause it?

Nothing magical.

Most likely, the installation of FoxPro changed the the setting.

When you install a program, most of them define what extension of files it uses and try to define/redefine them and establish an ownership over those extensions.

For some reason, the default setting was "Run", not "Open" - which is, admittedly, a weird choice for a .DBF file set by VFP itself.
 
Why would an Installation change the setting? I would think an installation would be the last suspect... The reason I am curious is over the past 20 years I Have Never seen something like this where Run gets changed to Open or vice versa etc..... Not that I am doubting anybodys word here.
 

Not that I am doubting anybodys word here.
You might if you wish :), why not, you are entitled to do so. I wouldn't mind, really, even though I've seen all kinds of weird things happen.

To make sure, now, after it is fixed, you or OP might now try to reinstall the VFP9 all over again ;-) and report here with the results.

Don't look at me,though. I still have VFP6, and don't know if we ever get VFP9 (the talks of upgrading last longer that VFP9 exists).
 
That unfortunately is a user fault.

In Tools->options->Projects under "Project Double Click action", if the "modify selected file" is checked, it will open the file. This is the default...

I am sure this option is in VFP6 as well, though I do not remember...
 
Hi all,

I've seen the same behaviour after a reinstall. Just call VFP9.exe with the /regserver command-line switch, this will fix file associations and DBFs will not be run or modified but opened.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top