Common FoxPro problems…and what you can do about them
If you’re reading this, the chances are you’re experiencing an issue with your FoxPro system. This could be anything from a minor annoyance to a catastrophe corrupting or losing your data. Remember, one of the first and best things you can do is ensure you have a good backup and verification process in place. The worst case scenario is then reduced to restoring from your last good backup and re-entering data since that point.
I’m getting a Fatal error exception code C0000005
This is a common error message that can pop up unexpectedly. It indicates that there’s some kind of memory error, often a buffer overrun. There are a few possible causes. The rest of the error message and stack trace (the technical jibber-jabber that comes after it) will clue up developers like us to the underlying problem.
If it suddenly starts coming up on several computers on the network, it’s a sign that a table or index has become corrupted. If you can get everyone out of the system easily then running a reindex operation may solve it. If only one computer is experiencing this error and the rest of the network is running smoothly it could indicate a problem with the memory on that computer. Try restarting it and see if that solves it.
If neither of those solutions work, then best to give your FoxPro developers a call to have a look into it.
My FoxPro application keeps freezing up!
If you’re finding that your FoxPro program is running fine then periodically freezes up for a short while the most likely cause is an over-zealous Anti Virus program which is scanning the database files.
This is pretty easy to fix, though you might have to get your IT support people involved if changes have to be made centrally. You just need to configure your Anti-Virus software to skip scanning the database files themselves (these are the files that end in `.dbf`), or simply exclude the folder that they’re located in. Don’t worry, there’s no executable code that can be embedded in the FoxPro tables that could be hiding a virus.
I think my data could be corrupt (a.k.a where’s my data gone!)
First, what do we mean when we say data corruption? It can appear in a few different ways. The most common ones are:
- Data you know was entered on the system and not been deleted has disappeared
- You’re seeing the same data repeated, for example, a list of different documents all open the same file
- A unique reference number is not so unique – several records are showing the same number
FoxPro is a file-based database system. This means that the data is stored in files on the computer and shared amongst all the computers on the network. It’s easy for these files to become corrupted if the FoxPro system isn’t exited properly or if you lose power to the computer when you’re using the program. There are also the more nebulous issues of file-locking, network settings and caching configurations which can contribute to data corruption.
To prevent or mitigate issues like this in the future, we always recommend properly closing the program down when you’re finished with it. If possible having some kind of Uninterruptible Power Supply (UPS) device on all computers will avoid power-loss issues.
However, onto the solution. The first port of call is to have everyone log out of the system and close the program and perform a reindexing operation. 8 times out of 10 a reindex will fix the problem when one or more index files get corrupted. If that doesn’t solve it, what you do next depends on a few factors.
- Ready access to FoxPro developers
- Backups
- Recency of issues experienced
If it can be determined that the problem is recent and not just that you’ve noticed the problem, then the likely quickest and best course of action will be to restore from the last known good backup and re-enter any data since then. If that’s not viable, then you need to contact your nearest FoxPro developer. The corruption could be more serious and we may need to fix the database container or completely rebuild the indexes. In the worst of cases that we’ve seen, we’ve been able to recreate new tables and indexes and migrate all the good data so data loss was minimised.
I’ve accidentally deleted the wrong data!
We’ve all done it; you click delete, hit the “OK” button on the confirmation box and then you realised it was the wrong record! Often, in bespoke systems there’s no Undo feature so what to do? FoxPro, by default, doesn’t delete the data and just marks it as deleted to be cleared out later. This means you can just give your nearest, friendly FoxPro developer a call. Often they will be able to restore the deleted data.
I’ve upgraded my computer to Windows 7 or greater and now my FoxPro system doesn’t run!
This probably means you have an rather old application that uses an old version of FoxPro. Congratulations on running your system for such a long time! In this article I’ve just been talking about FoxPro generally but there are several flavours. The primary editions are:
- FoxPro for DOS
- FoxPro for Windows
- Visual FoxPro
In this scenario, it’s the first two editions that no longer work on Windows 7 or above (at the time of writing, if your system uses Visual FoxPro it should still be running). This means that it might be possible to update your software to be recompiled using Visual FoxPro. This could be simple or it could be involved and time-consuming. You have little choice so I would recommend you contact your FoxPro developer for an initial assessment. If you can no longer contact your FoxPro developer (we’re becoming a rare breed), give us a call and we’ll be able to advise on your best course of action.
My FoxPro system is running slowly
There’s a couple of possible scenarios.
- Sometimes it’s a gradual slowdown that doesn’t get noticed by anyone until a point when people start saying, “I’m sure it used to be faster than this”.
- It’s suddenly running much slower than it was and usually everyone notices it at the same time. You might also notice you have some data corruption issues too.
A gradual slowdown suggests that you have data that is not well indexed. As your dataset grows it will take longer and longer for the system to search the data to find what it’s looking for. Your FoxPro developers can work with you to see where the slowdowns are occurring. They can determine where better indexes can be applied to the tables to speed up the operations and return you to a lightning-fast system.
If your system is suddenly running much slower, the most common cause is often substandard or faulty network equipment. FoxPro is fast when it comes to handling data and can put stress on a computer network. To solve this, you’ll need to co-opt your IT support to hunt down the offender. It could be a faulty port on a network switch, or a failing network card in one of the computers. Sometimes a restart of the equipment is enough to solve it. If it keeps re-occurring then it’s a sign that it might need to be replaced. If you saw other issues like corruption, then you will need to run a reindex operation too.
If you are unsure, give us a call. We offer a FoxPro diagnostic service for a fixed fee to quickly determine the cause and possible solutions.