Solved

VFP9 Double click on DBF <filename>.dbf gives message "<filename>.fxp is not an object file"

Posted on 2010-08-19
16
3,655 Views
Last Modified: 2012-06-27
In Windows Explorer, when I double click on a dbf file (of form <filename>.dbf), instead of opening the file in VFP, I get a message "<filename>.fxp is not an object file".

e.g. clicking on T_DCLNT.DBF, gives message  "t_dclnt.fxp is not an object file".

OS is Windows 7 Home Premium 64 bit.

Am unsure what to do as Windows 7 no longer has the Edit File Type tab to edit actions associated with a particular extension or file type.
0
Comment
Question by:logicalc
  • 5
  • 4
  • 3
  • +1
16 Comments
 
LVL 2

Expert Comment

by:aamsoh
ID: 33472552
follow these steps.

NOTE: DON'T FORGET TO CLICK "HELPFUL COMMENTS YES"

   1.

      Click on Start and then Control Panel.

      Tip: In a hurry? Type associations in the search box after clicking the start button. Choose Make a file type always open in a specific program from the list of results and then skip to Step 4.
   2.

      Click on the Programs link.

      Note: If you're viewing the Small icons or Large icons view of Control Panel, you won't see this link. Click on the Default Programs icon and then click on the Associate a file type or protocol with a program link. Then proceed to Step 4.
   3.

      Click on the Make a file type always open in a specific program link under the Default Programs heading.
   4.

      In the Set Associations window, scroll down the list until you see the file extension that you want to change the default program for.
   5.

      Click on the file extension to highlight it, once you've found the one you're looking for.
   6.

      Click the Change program... button above the scroll bar.

      The Open With dialog box should appear.
   7.

      Look through the options in the Recommended Programs area and choose the application that you want to open the file extension with when you double-click on the particular kind of file on your computer.

      Note: Chances are, the applications listed under Recommended Programs will contain the most applicable programs for this file type but be sure to look at the applications under Other Programs. You may need to click the v to expand the list of these programs.

      Note: Click Browse... to search through your computer for any program not listed that you'd like to use.
   8.

      Click the OK button on the Open With window. Windows 7 will refresh the list of file associations to show the new default program to open this type of file.
   9.

      Click the Close button at the bottom of the Set Associations window. You may also close the Control Panel window if it's still open.
  10.

      From this point forward, when you double-click on any file with this particular file extension, the program you associated it with in Step 7 will launch and load the particular file.

      Important: Whatever program used to automatically open when these types of files were launched will still open these types of files. To use another program, you'll just need to start the program manually and then browse your computer for the particular file.
0
 

Author Comment

by:logicalc
ID: 33472770
Thanks aamsoh, but I already did this. VFP9 is already associated with .dbf files.

The problem is that Visual FoxPro is trying to run the file rather than open it. I need to find how to change this behaviour.
0
 
LVL 2

Expert Comment

by:aamsoh
ID: 33472879

Thankx, EE Zone Advisor,

Actually some people forget to press the buttons after get the right answer.

0
 
LVL 2

Expert Comment

by:aamsoh
ID: 33472881
do you want to open this file to modifying structure or open as to read data?
0
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 33473051
Start cmd via "Run As administrator", then run vfp9.exe /regserver, that should reastablish the correct handling of vfp files including opening up a dbf when double clicking it.

You can even improve that, see here: http://www.berezniker.com/content/pages/visual-foxpro/fix-vfp-file-associations-open-files-one-vfp-instance.

@aamosh, your 10 useful steps work for many file extensions where you only have one possible open action, in foxpro when doing this kind of association the file opened will be started, executed, which means the dbf is treated like a prg, which does not work. Taking these steps even can cause this to happen.

Bye, Olaf.
0
 

Author Comment

by:logicalc
ID: 33473065
I want to "USE" the file in VFP. On my XP computer when I double-click on a .dbf file, this happens.
0
 

Author Comment

by:logicalc
ID: 33473112
Thanks Olaf_Doschke. I tried "vfp.exe /regserver" before. Though it did not work, I tried it again - but it still changes nothing.

I had also seen : http://www.berezniker.com/content/pages/visual-foxpro/fix-vfp-file-associations-open-files-one-vfp-instance. I edited the entries to set just those for the section for "table", but again, this did not work.
Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\Visual.FoxPro.Table\shell\open\command]
@="\"C:\\Program Files\\Microsoft Visual FoxPro 9\\vfp9.exe\""
 
[HKEY_CLASSES_ROOT\Visual.FoxPro.Table\shell\open\ddeexec]
@="open(\"%1\")"
[HKEY_CLASSES_ROOT\Visual.FoxPro.Table\shell\open\ddeexec\Application]
@="FoxPro"
[HKEY_CLASSES_ROOT\Visual.FoxPro.Table\shell\open\ddeexec\Topic]
@="System"

Open in new window

0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 33473541
You need to run as admin for this to go where it should go, otherwise all the registry entries made by vfp.exe /regserver or the Windows Registry Editor Script will go into the virtualized branch of the registry, where they are useless.

It's not enough to be admin user on Win7 or Vista, this still virtualizes files or registry keys, unless you rightclick and "run as admin".

So create a txt file with the line
"C:\Program Files\Microsoft Visual Foxpro 9\vfp9.exe"/regserver
adjust to your installtion directory, rename the txt to vfpreg.cmd, then right click on it and start it with "Run as Administrator", even if your account is an admin and even if your logged in as "Administrator". This is basic UAC behaviour, it goes for every account to provide better security. You'll need to "Allow" the cmd to run as Administrator (in german it's "Zulassen", I don't know how windows prompts in english) and then it'll go into the right place of the registry.

The same goes for the registry script, only it needs a file extension .reg instead of cmd.

Bye, Olaf.
0
 

Author Comment

by:logicalc
ID: 33473791
Olaf Doschke, I ran these as administrator, exactly as you suggested, but they did not fix the problem.

Thanks
David
0
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 33473949
Then I can only recommend to reinstall VFP, as it works from a fresh installation.

Bye, Olaf.
0
 
LVL 2

Accepted Solution

by:
FEOX earned 500 total points
ID: 33480764
Have you tried the following registry settings?  The one you provided seem to be missing the "-SHELLOPEN" clause included when VFP 9 is installed.  My installation did not use any "ddeexec" keys.
Windows Registry Editor Version 5.00



[HKEY_CLASSES_ROOT\.dbf]

@="Visual.FoxPro.Table"



[HKEY_CLASSES_ROOT\Visual.FoxPro.Table\shell\open\command]

@="\"C:\\Program Files\\Microsoft Visual Foxpro 9\\vfp9.exe\" -SHELLOPEN \"%1\""

Open in new window

0
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 33482563
The registry keys Sergey Berezniker provides are different from the original ones, because they offer the feature of opening a dbf within a running VFP IDE, only opening a new VFP IDE instance, if there is none running. That's why there are DDE entries.

vfp9.exe /regserver does recover the keys as you propose.

Bye, Olaf.

0
 
LVL 2

Assisted Solution

by:FEOX
FEOX earned 500 total points
ID: 33482850
I noticed that using a Command Prompt to execute this command on a directory with DBF files:

"C:\Program Files\Microsoft Visual Foxpro 9\vfp9.exe" T_DCLNT.DBF

VFP 9 tries to open the file as a program (not as a table).

Adding the "-SHELLOPEN" option to the command automatically opens the T_DCLNT.DBF as a table not as a program:

"C:\Program Files\Microsoft Visual Foxpro 9\vfp9.exe" -SHELLOPEN T_DCLNT.DBF

Maybe it was just the "-SHELLOPEN" option was just missing on the registry.  Not sure if that option is fixed by VFP9.EXE /regserver.

Maybe just adding the "-SHELLOPEN" clause on the registries will fix his problem.
0
 

Author Comment

by:logicalc
ID: 33482991
You are a star FEOX, well done, this fixed it!

Changing the registry line for the default in HKEY_CLASSES_ROOT\Applications\vfp9.exe\shell\open\command. as you suggested, fixes this.

As I have 64-bit Windows 7, I set the value to:
"C:\Program Files (x86)\Microsoft Visual FoxPro 9\vfp9.exe" -SHELLOPEN "%1"
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now