 |
|
 |
|
Junior Member
Join Date: Sep 2009
Posts: 24
Rep Power: 0 
|
|
 |
|
 |
|
 |
|
 |
|
How to troubleshoot to resolve suspected corruption in Visual FoxPro
 |
|
 |
|
SUMMARY
When Visual FoxPro used, you sometimes run into problems. The cause of these problems is not always directly clear. In such conditions, you require a general method or a process of trial and error troubleshooting techniques. The steps also apply to the distributed application .exe files that are written in Visual FoxPro that you install on client PCs.The first step is to ensure that you have an error free installation of the Visual FoxPro product. In our experience, if you install the latest version in same folder as the earlier version, the installation does not complete correctly. This is because all of the files may not update or install properly.
MORE INFORMATION
1. If Visual FoxPro is installed on local PCs use the following steps:
a. Back up your files. Save any files on PC that you want to keep; specially database (.dbc/.dct/.dcx) files and table (.dbf/.fpt/.cdx) files, with other source files like .pjx, .pjt, .vcx,.vct, .scx,.sct, .mnx .mnt, .frx .frt, and the Config.fpw file.
b. Remove Visual FoxPro entirely, and then delete the directory where it was installed.
c. Close all open or running applications.
1. Using CTRL+ALT+DELETE opens the system Task Manager allowing you to see what applications are now running.
d. do operating system disk error check by using Scandisk or a third-party disk repair tool. These tools check and try to fix any lost clusters on the hard drive. After this, run the Disk Defragmenter utility in Windows XP or other tool to optimize the disk.
2. Once again, close all open or running applications.
3. Install Visual FoxPro into a new or different directory place.
. A successful product installation means that you do not get any errors during the installation. Errors during installation show an unreliable installation of Visual FoxPro. If errors happen:
1. Note any errors during installation process.
2. Boot the machine in Safe Mode or Safe Mode with Networking. Furthermore, temporarily disable any anti virus software.
3. Start at Step 1 again.
4. If Visual FoxPro is installed on network server:
. You must have an error free installation of Visual FoxPro.
a. Normally, you cannot do ScanDisk or other disk integrity checking while a Local Area Network (LAN) or Server is running.
b. Remove and reinstall Visual FoxPro until no installation errors are received.
5. Eliminate all DUPLICATE source code and project files. This adds both network and local drives.
. Copy files cause many problems. Ensure that you remain correct version of the source or project file, and ONLY the right one.
6. If your project has DATABASE/DBC, VALIDATE the database.
Use the OPEN DATABASE <dbcname> EXCLUSIVE VALIDATE command.
Errors show table (.dbf) or index (.cdx) corruption.
7. Clean up the project.
Open your project and then from the Project menu, choose "Clean Up Project".
Errors indicate project (.pjx) file corruption.
8. As a way to test with a different file, USE the file as you would a table (.dbf), copy the .dbf structure to a new file, and append the records from the original table, and rename the files. This method necessitates the creation of a new index (.cdx) file, if needed.
Database, Project, Screen, Menu, Report, and Label files are actually Table (.dbf) files that have a different extension other than .dbf.
If your file is open in the Visual FoxPro interactive or design environment, close it.
Issue the following commands in the Visual FoxPro Command window:
USE customer.dbf && Must specify extension if other than .dbf.
? RECCOUNT() && Note the number of records in the table.
COPY STRUCTURE to newfile.dbf
USE newfile.dbf && Empty file structure without records.
APPEND FROM customer.dbf && Bring in records from original table.
? RECCOUNT() && Compare number of records with original file.
RENAME customer.dbf to oldcust.dbf
RENAME newfile.dbf to customer.dbf
9. Check on several PC or in a several PC environment such as a single user environment if problems happen in a multi-user environment or use a different operating system.
10. If corrupt, the FoxPro resource file may cause problems.
One way to test whether the resource file is a factor is to replace the file. Here are two ways to determine the name and location of the FoxPro resource file:
. You can decide the place of the currently active resource file by using the following FoxPro command:
?SYS(2005)
a. You can identify the FoxPro resource file in the FoxPro configuration file, named Config.fpw by default. If the resource file specific by the configuration file does not exist, FoxPro creates one.
1. Use the following FoxPro command to decide the place of the configuration file:
?SYS(2019)
2. The configuration file is an ASCII text file, which can be edited with any editor that saves it in ASCII text format. The easiest way to edit the currently active FoxPro configuration file is with the following command:
MODIFY FILE SYS(2019)
3. The configuration file may contain a line of text that specifies the location and name of the resource file, such as follows:
RESOURCE=<path>\foxuser.dbf
If so, comment that line out by placing an asterisk (*) at the start of the line.
4. Add a new line such as the following:
RESOURCE=<path>\newjunk.dbf && Any name of your choice.
5. Restart FoxPro for the new setting to take effect.
11. Make a log file has the results of the previous steps for future reference.
|
|
 |
|
 |
|
|
 |
|
 |
|