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!

foxpro2.6..I am running foxpro database programme in windows 10.. getting and error-illegal command-

Status
Not open for further replies.

jon_williams

Technical User
May 18, 2020
4
BB
I am running foxpro database programme in windows 10.. getting and error-illegal command- fix foxpro

how do i fix it...
i am also running the programme through dox box to enable me to run the dos proramme in windows 10...
the dos box initiates it and my programme screen come up by when i try to run my programme i am getting an error on the database as listed above..

trying to fix this...
 
I second this. It's of no use only knowing the error, especially a message of such general meaning.
The single keywords "illegal" and "command" do appear in the error messages VFP errors have, but "illegal command" is not an error message. But what would it mean, the command in the source code is illegal. It would rather happen at compile time as syntax error than at runtime. But as you can use macro substitution and even user input may be executed by it this could happen in a compiled EXE - well - at compile time of code executed that includes macro substitution. I'm not so sure when EXECSCRIPT was introduced, but if this is code you entered this simply tells you, no, doesn't work. If it's really FP it's neither DBase nor Clipper nor anything other clones offer.

Any, this seems like it is a user-defined error message (or programmer-defined, from your user-perspective), no official Foxpro error that explains its root reason.

The full list of errors is in the VFP help sorted by error number and sorted alphabetically by message.

and

have them and you can search them simply by STRG+F in-page search.

Besides you can get the full VFP9 SP2 and enhanced help from Microsoft has removed the reference to VFP in the MSDN library, only ODBC reference remains on microsoft.com.

And yes, this (the VFPX help file) has much more than FP 2.6, so you can easily get lost in things not relevant to your application, but as it has put back legacy topics you should be able to find out what's wrong in your case.

I don't see that legacy Foxpro had a completely different error list. Errors would need to have deprecated or changed over time and this would be in contrast to how backward compatible VFP is, what MS did was remove help chapters about commands superseded by other concepts, you often only find a stub saying "only for backward compatibility. Use this/that instead". And you can see legacy help topics in the VFPX Github maintained help. I can tell you upfront that it does not contain that error message either. because I use that help. It has a footer on every page denoting "Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition..." that way I am sure if there is a chance this error message is legacy FP it would need to be something still not yet put back in this help and as far as I know that merge of the legacy and the modern help file is a completed step of the VFPX help project.

So either you're just forwarding something told to you by a phone call or are written into a ticket system. It helps if a system has error logging. Putting the exact error message into a log is just a starter about what difference that makes. If you can refer to the code that causes that error you have a much better chance to fix it. And error handling enables you to know the line of error in which PRG or class method, in which stored proc plus what else was on the call stack, ie key points on the way the application got there, by what it was called.

Good error handling would enable you to know more things known at the error situation like all variables and their values dumped in a list. Ideally, you know the user story, what the user did before encountering an error (and of course that is anecdotal, but the shorter and simpler the cause is, the easier the reproduction and thus ability to fix it. Taking the same steps you can put yourself into the same situation and know much more than the direct error reason.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Thanks guys for you help.

A bit of background.

The programme is written in fox for dos...

I configure Dox box to run the programme in windows 10.

The dos box runs the programme and allow me to see my first screen for me to enter my login and password.. the programm is unable to run the database .. the database apparently is corrupt and the system would not allow me to fix the database...the error flashes on the screen as Illegal Command: fix foxpro.
sending you pic...
attached file link below


 
 https://files.engineering.com/getfile.aspx?folder=7efe3709-02f5-4883-9180-0a040ced141f&file=IMG-20191029-WA0002_(1).jpeg
Unfortunately the error message in your screen shot is illegible - at least, it is on my system. Could you just type the actual wording of the message into this thread.

But even if we could see the message, it would not tell us what the illegal command is.

You say, "the database apparently is corrupt". What is the indication of that? Did you see a message telling you the database is corrupt? Normally, you wouldn't expect a corruption in a database to show as an "illegal command" message, but we are working in the dark here.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
thanks mike.. will get a better shot and document the info... asap... thanks again for your support....
 


illegal command:fixfoxpro.
illegal command:fixfoxpro.
illegal command:fixfoxpro.
illegal command:fixfoxpro.


invoice files are being fixed.
 
illegal command:fixfoxpro.

If that is the extent of the error message, I doubt if anyone here will be able to help.

And what is "invoice files are being fixed"? Is that part of the error message? Or does it mean that you are in the process of fixing the invoice files, whatever that means?

And where is the indication that "the database apparently is corrupt".

In the absence of any other information, I would guess that only the application's original developer will be able to help you.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
As already assumed this is not a Foxpro error message, this is an individual message of the software.

jon_williams said:
the programm is unable to run the database .. the database apparently is corrupt and the system would not allow me to fix the database

You don't run a database, you query a database, you open it and use tables, etc. You could be right some dbf is corrupt. And likely, in case a dbf is corrupt, the software tries to repair it or offers a repair feature you use. And this time it fails. Maybe there should be another module or external tool called fixfoxpro, but that's also no command or message coming from FoxPro itself. And the only commercial DBF fixing tool coming close to this name is foxfix. I rather assume it's something proprietary the same vendor did as repair module of any software package they did.

I'm with Mike's conclusion: Only the vendor of that software could help if no documentation or manual coming with it covers this problem.

If repairing with the software feature won't work, the best option you have is to restore a backup. You do make backups of business-relevant data, don't you?
If you moved the software by moving one folder to a new PC, you may have lost something in other installation locations, like such a dbf repair tool. thus that feature is broken. Do you have a setup of the software you could run again, maybe you could complete the installation to have this tool back.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top