Copyright: Created by Michael Fenbert.


FoxPro Error Messages (Contents)
FoxPro Error Messages

Errors A - Z

Errors by Number

Distribution Kit Error Messages

FoxDoc Error Messages

General Troubleshooting Tips


Error Listings Alphabetically
Error Listings A - Z


Errors Starting with "< >"
"< >"

"<cursor>" must be created with SELECT ... INTO TABLE

"<field>" is not related to the current area

"<field> | <variable>" is not unique and must be qualified

"<file>" is not a FoxPro EXE file

"<file>" is not an object file

"<name>" is not a file variable

"<name>" is not a memory variable

"<name>" is not an array

** or ^ domain error

*bad date*


Errors Starting with "A"
A

ACOS() : Out of Range

ALIAS name already in use

ALIAS ["<alias>"] not found

All work areas in use

API 'Create Reg Key Value'

API Function _UserError() was called

API Library not found

API Library revision mismatch

Application file "<file>" not closed

Area cannot contain handle

Area size exceeded during compaction

ASIN() : Out of Range

Attempt to lock file

Attempt to move file to different device

Attempt to use FoxPro function as an array


Errors Starting with "B"
B

Bad array dimensions

Bad drive specifier

Bad .LIB file

Bad width or decimal place argument

Bar position must be a positive number

Beginning of file encountered

Beyond String

Browse table closed

Browse structure changed


Errors Starting with "C"
C

CANCEL/SUSPEND is not allowed

Cannot access selected table

Cannot activate OLE server

Cannot allocate screen map

Cannot append from password-protected file

Cannot build APP/EXE while suspended

Cannot build APP/EXE without a main program

Cannot clear menu in use

Cannot clear popup in use

Cannot convert memo file for a read-only table file

Cannot create file

Cannot create file "<file>"

Cannot create program workspace

Cannot do I/O with EMS

Cannot find OVL file

Cannot find screen/menu generation program

Cannot find spell check program

Cannot GROUP by aggregate field

Cannot import from password-protected file

Cannot load PROAPI16.EXE

Cannot load 16-bit API interface

Cannot locate COMSPEC environment variable

Cannot locate desirable version

Cannot open configuration file

Cannot open file "<file>"

Cannot read drive X (or any other letter)

Cannot redefine menu in use

Cannot redefine popup in use

Cannot rename current directory

Cannot run on MS-DOS before version 3.0

Cannot SET FORMAT while in a READ with a FORMAT file

Cannot update file

Cannot write to a read-only file

COLORSET resource not found

Column number must be between 0 and 255

Column number must be between 0 and right margin

COLUMN/FORM/ALIAS/NOOVERWRITE/WIDTH allowed only with FROM clause

COLUMN/ROW/ALIAS/NOOVERWRITE/SIZE/SCREEN allowed only with FROM clause

Compiled code for this line too long

Constant is already #defined

CONTINUE without LOCATE

CPU exhibits 32-bit multiply problem

Cyclic relation


Errors Starting with "D"
D

Data type mismatch

Table (database) is not ordered

Table/DBF operation invalid while indexing

Database record is trashed

DESCENDING not permitted on IDX files

Display mode not available

Division by 0

DO nesting too deep

Duplicate field names

Dynamic memory exhausted


Errors Starting with "E"
E

End of file encountered

ENDTEXT without TEXT

Error copying OLE object to Clipboard

Error creating OLE object

Error in label field definition

Error reading resource

Error saving OLE object

Exclusive open of file is required

Expression evaluator fault


Errors Starting with "F"
F

Fatal error <expN> reporting error <expN>

Feature not available

Field must be a general field

Field must be a memo field

"Field" phrase not found

File access denied

File already exists

File cannot be locked

File close error

File ["<file>"] does not exist

File internal consistency error

File is in use by another

File is in use

File is open in another work area

File is read-only

File is the wrong version

File must be opened exclusively to convert memo file

File not open

File read error

File was not LOADed

File write error

FILTER expression too long

FILTER requires logical expression

FOR/WHILE need logical expressions

Foreign node found during compaction

FoxPro(x) hangs upon exiting

FOXUSER file is invalid

Free handle not found

Function not yet implemented


Errors Starting with "G-J"
G-J

IF/ELSE/ENDIF mismatch

Illegal operation for general field

Illegal operation for memo field

Illegal printer driver recursion

Illegal seek offset

Illegal value

Import only Worksheet A for Lotus 1-2-3 version 3.0 files

Improper data type in field expression

Improper data type in group expression

Incompatible memory manager

Incorrect handle found during compaction

Index does not match table file. Recreate index

Index expression is too big

Index file does not match table

Index tag not found

Index tag or file name must be specified

Insufficient memory

Insufficient stack space

Internal consistency error

Internal error: Too many characters in report

Internal .LIB undefined symbol error

Invalid buffdirty call

Invalid buffpoint call

Invalid box dimensions

Invalid BROWSE

Invalid character in command

Invalid compact EXE file. Rebuild EXE

invalid table number

Invalid DIF file header

Invalid DIF type indicator

Invalid DIF vector -- DBF field mismatch

Invalid Excel version 2.0 file format

Invalid field width or number of decimal places

Invalid file descriptor

Invalid function argument value, type or count

Invalid index number

Invalid key length

Invalid keyboard macro file format

Invalid .LIB signature

Invalid Lotus 1-2-3 version 1.0 file format

Invalid Lotus 1-2-3 version 2.0 file format

Invalid Lotus 1-2-3 version 3.0 file format

Invalid Multiplan version 4.0 file format

Invalid or corrupted OLE object

Invalid or duplicate field

Invalid or missing EXE

Invalid operation for CURSOR

Invalid Paradox version 3.5 file format

Invalid path or file name

Invalid pointer

Invalid preprocessor expression

Invalid printer redirection

Invalid SET expression

Invalid Symphony version 1.0 file format

Invalid Symphony version 1.1 file format

Invalid subscript reference

Invalid SYLK file dimension bounds

Invalid SYLK file format

Invalid SYLK file header

Invalid variable reference

Invalid WINDOW file format

I/O operation failure


Errors Starting with "K-L"
K-L

Key label ["<label>"] is invalid

Key string too long

Key too big

Label file invalid

label nesting error

Left margin plus indent must be less than right margin

Library file is invalid

Line number must be less than page length

Line too long

Link command failed

Localized product required for this environment

LOG() : Zero or negative

LOG10() : Zero or negative

Logical expression required


Errors Starting with "M"
M

Macro not defined

Maximum allowable menu items (128) exceeded

Maximum allowable menus (25) exceeded

Maximum number of popup bars is 32760

Maximum record length exceeded in import file

Meaningless use of expression

Memo file is missing/invalid

Memory variable file is invalid

Menu file invalid

Menu has not been activated

Menu has not been defined

Menu is already in use

Menu item cannot be defined

Menu item cannot be released

Menu items/titles must be type CHARACTER

Menu manager internal consistency error

Menu/Popup was not pushed

Mismatched #IF/#ELSIF/#ELSE/#ENDIF

Mismatched braces in key label

Mismatched case structure

Missing #ENDIF

Missing (

Missing )

Missing ,

Missing expression

Missing operand

Missing .RTT section

MULTISELECT/MOVER not supported for PROMPT style popup

Must be an array definition

Must be a character, date or numeric field

Must be a file variable

Must be a memory variable


Errors Starting with "N"
N

Nested aggregation not allowed

Nesting error

Nested key labels are invalid

No bars have been defined for this popup

No table is in USE

No fields to process

No fields were found to copy

No memory for buffer

No memory for file map

No memory for file name

No menu bar defined

No pads defined for this menu

No PARAMETER statement found

No popup menu defined

No previous PRINTJOB to match this command

No such menu/item is defined

Not a character expression

Not a table/DBF file

Not a numeric expression

Not a user-defined window

Not a valid Framework II database/spreadsheet

Not a valid RapidFile database

Not an object file

Not enough disk space for "<filename>"

Not enough disk space

Not enough memory to USE table

Not suspended

NOWAIT/SAVE/NOENVIRONMENT/IN/WINDOW clauses not allowed with FROM

Numeric overflow (data was lost)


Errors Starting with "O-P"
O-P

Object file "<file>" is the wrong version

Operator/operand type mismatch

OS memory error

PAD has not been defined

Picture error in GET statement

Picture too big, corrupt, or wrong format

POPUP has not been activated

POPUP has not been defined

POPUP is already in use

POPUP is too small

Popup too big, first <expN> entries shown

Position is off the screen

PREVIEW clause not allowed with OFF/NOCONSOLE or TO PRINT/FILE

Printer driver is corrupted

Printer driver not found

Printer not ready

PRINTJOBs cannot be nested

Procedure "<procedure>" not found

Product in use by another

Product has not been properly installed

Program too large

Project file is invalid

PROMPTs for this popup have already been defined


Errors Starting with "Q-R"
Q-R

Queue "<queue>" not found

Record is in use by another

Record is in use: Cannot write

Record is not in index

Record is not locked

Record is out of range

Record not available

Record too long

Recursive macro definition

Relational expression too long

Report file invalid

Report nesting error

Required clause not present in command

Resource file unavailable

RUN/! command failed

RUN/! command string too long


Errors Starting with "S"
S

Screen code too large for memory

Screen file invalid

SELECTs are not UNION compatible

Server "<server>" not found

Setup.ini missing or invalid

Sharing Violation Reading Drive

Source code not found

Source code out of date

Source not available

SQL aggregate on non-numeric expression

SQL canceled operation

SQL column "<field>  | <variable>" not found

SQL could not locate table

SQL err building temporary index

SQL Error Correlating Fields

SQL expression too complex

SQL illegal GROUP BY in subquery

SQL index not found

SQL Internal Error

SQL invalid * in SELECT

SQL invalid aggregate field

SQL invalid DISTINCT

SQL invalid GROUP BY

SQL invalid HAVING

SQL invalid ORDER BY

SQL invalid predicate

SQL invalid SELECT statement

SQL invalid SELECT

SQL invalid subquery

SQL invalid temporary file

SQL invalid WHERE clause

SQL invalid use of subquery

SQL invalid use of UNION in subquery

SQL no FROM clause

SQL open file failed

SQL out of memory

SQL queries of this type are not supported at present

SQL statement too long

SQL subqueries nested too deep

SQL Too many columns referenced

SQL Too many subqueries

SQL Too many UNIONs

SQRT domain error

Stack overflow -- expression too complex

Statement not allowed in interactive mode

String memory variable area overflow

String too long to fit

Structural CDX file not found

Structure invalid

Structure nesting too deep

Subscript out of bounds

Subquery returned more than one record

Syntax error

Syntax error in field expression

System Resources Exhausted


Errors Starting with "T"
T

Tab stops must be in ascending order

Table (database) is not ordered

Table/DBF operation invalid while indexing

Target is already engaged in relation

Too few arguments

Too many arguments

Too many extensions specified

Too many files open

Too many memory variables

Too many PICTURE characters specified

Too many PROCEDURES

Too many READs in effect

Too many names used

Too many records to BROWSE/EDIT in demo version

Too many relationships

Total field type must be numeric

Total label width exceeds maximum allowable size

Transgressed node found during compaction


Errors Starting with "U"
U

Unable to create temporary work file(s)

Unable to locate desired version of FoxPro

Unable to generate printer driver

Unable to project nonCNT values

Unable to process error

Unknown error code <expN>

Unknown function key

Unrecognized command verb

Unrecognized index file revision. Please recreate index.

Unrecognized phrase/keyword in command

Unresolvable REGIONAL name conflict

Use of invalid handle

Use of unallocated handle

Use of transgressed handle


Errors Starting with "V-Z"
V-Z

Variable must be in selected table

Variable ["<variable>"] not found

View file invalid

WINDOW coordinates are invalid

WINDOW has not been activated

WINDOW ["<window name>"] has not been defined

Word files must be embedded

Worksheet A for Lotus 1-2-3 version 3.0 file is hidden

Wrong length key

Wrong number of parameters


"<cursor>" must be created with SELECT ... INTO TABLE

Some cursors cannot be used in successive queries.

When you are creating a cursor from a simple SELECT command and then selecting from the cursor into another cursor and DELETED is SET to OFF, the above error message is generated.

When DELETED is SET to ON, this error does not occur. This behavior is by design. However, the documentation for the SELECT command states only that a SELECT command can be taken FROM an alias. The documentation does not mention that there are times when this operation will not work.

The following code illustrates this situation:

SET DELETED OFF

SET DEFAULT TO C:\FOXPRO(W)\TUTORIAL

SELECT * FROM Customer INTO CURSOR Cust1

?DBF()	&& this should point to the CUSTOMER.DBF in TUTORIAL

SELECT * FROM Cust1 INTO CURSOR Cust2	&& this should generate the error

CLOSE ALL

SET DELETED ON	&& this changes things

SELECT * FROM Customer INTO CURSOR Cust1

?DBF()	&& this should now point to a .TMP file

SELECT * FROM Cust1 INTO CURSOR Cust2	&& this should work now giving us

*                                           Cust2

The SET DELETED ON command forces FoxPro to create a .TMP file rather than just point to the original file even if there are no fields in CUSTOMER.DBF that are marked for deletion. (This behavior would also occur if the SELECT command creating Cust1 were more restrictive.)  The simple SELECT command in the above code fragment just causes FoxPro to use CUSTOMER again; since the SELECT * FROM Customer command represents the entire CUSTOMER table, FoxPro saves time by not really performing the SELECT command.


"<field>" is not related to the current area

The field you have specified is not in the table in the current work area.


"<field> | <variable>" is not unique and must be qualified

The field or variable in the SQL SELECT command you have specified cannot be found.


"<file>" is not a FoxPro EXE file

The .EXE file specified was not created by FoxPro.


"<file>" is not an object file

An attempt was made to load a compiled FoxPro program that does not have a proper header.

To correct this problem, delete the .FXP file (if this problem is occurring in a project file, choose Rebuild Project and Rebuild All).


"<name>" is not a file variable

A memory variable or an array variable was used where a file variable (field) is required.


"<name>" is not a memory variable

A file variable (field) was used where a memory or array variable was required.


"<name>" is not an array

A DIMENSION statement contains a variable declaration without the required subscript arguments.


** or ^ domain error

Exponentiation was attempted on a negative number.


*bad date*

The date expression you used is invalid.


ACOS(): Out of Range

The expression you have used with the arc cosine function has a value that is out of the range of -1.0 to +1.0.


ALIAS name already in use

There are three possible causes of this error:

An attempt was made to USE a table with an ALIAS that is associated with another table already in USE.

An attempt was made to SELECT a work area not in the range A through J or 11 through 25 or 225.

If the file that is being used has been renamed, it is possible the file is making a reference to the old index file that was associated with the file. In that case, rename the .CDX file to the new filename as well.


ALIAS ["<alias>"] not found

An attempt was made to either SELECT a work area not in the range A through J, or 11 through 25 or 225, or to specify an ALIAS that has not been defined.

If the error "ALIAS customer not found" occurs when you are trying to issue the USE test.dbf command (shown in the scenario below), there was probably an index associated with the CUSTOMER.DBF file. Therefore, DELETE the index file and the problem should be solved.

The following example illustrates the problem:

USE customer.dbf

COPY STRUCTURE TO test.dbf

USE test.dbf

APPEND FROM customer.dbf


All work areas in use

A table is open in all 25 or 225 work areas.


API 'Create Reg Key Value'

When you are installing FoxPro for Windows, the installation program will check to see if Microsoft Graph is installed on the system. If it is not, the installation program will install and attempt to register it in the REG.DAT file in the Windows program directory. During this process, the above error message may appear:

This error message can be caused by the presence of two REG.DAT files on the hard disk or a corrupted REG.DAT file.

To compensate for this error, you must create a new REG.DAT file, as follows:

1.	Quit Windows.

2.	If the REG.DAT file exists in the Windows program directory, rename it REG.OLD.

3.	Restart Windows and run REGEDIT (the Registration Information Editor) from the Program Manager.

4.	When the program comes up, choose Merge Registration File from the File menu.

5.	In the File dialog box, select SETUP.REG from the Windows SYSTEM subdirectory. This creates a new REG.DAT file in the Windows directory.

At this point, FoxPro for Windows can now be properly installed. The next step is to reinstall the other entries that may have been lost from the old REG.DAT file. This process is described in the Help file for the REGEDIT program.


API Function_UserError() was called

An error message has been generated by the API. The text of this message is determined in the API.


API Library not found

SET LIBRARY TO or RELEASE LIBRARY was issued but the specified library cannot be found.


API Library revision mismatch

The API library you are using does not match your version of FoxPro.


Application file "<file>" not closed

An attempt has been made to build an application while a file in the application is not closed.


Area cannot contain handle

See General Troubleshooting Tips.


Area size exceeded during compaction

See General Troubleshooting Tips.


General Troubleshooting Tips

Possible Causes

A conflict has occurred between FoxPro and something that was previously loaded in memory before starting FoxPro, for example, device drivers, memory managers, or terminate-and-stay-resident programs (TSRs).

If a memory manager is active, it is possible for FoxPro to address memory areas used by cards that are installed in the machine. It is important that all memory areas used by cards be excluded from the memory manager's range.

A corrupted index can cause corruption of memory as the table is navigated.

Some disk caches cause these errors.

Opening a FoxPro 2.5 table that has a general field in FoxPro 2.0 causes this error.

Suggested Solutions

 1.	Strip the CONFIG.SYS and AUTOEXEC.BAT files down to a "vanilla" system -- See Clean Boot.

 2.	Check for a memory manager and exclude all memory areas in use by video and tape controllers, SCSI controllers, network cards, and so on.

 3.	Remove structural indexes (DELETE TAG ALL) and recreate them. Just issuing a REINDEX command may improve the situation marginally but it will not fix it; .IDX and .CDX files must be removed and recreated using the INDEX ON command.

 4.	Check that the disk cache in use is approved for use with FoxPro. See Compatible Caches.

 5.	Rename or delete FOXUSER.DBF, FOXUSER.FPT, and CONFIG.FP(W). (When you restart FoxPro, a new FOXUSER.DBF file is automatically created.)

 6.	If the problem is occurring in FoxPro for MS-DOS, check to see if the error occurs in both 16-bit (Standard) and 32-bit (Extended) mode.

 7.	Check for adequate file handles in the CONFIG.SYS and NET.CFG or SHELL.CFG file.

 8.	Increase the size of the environment in the SHELL statement in the CONFIG.SYS file to 2048.

 9.	Do a Windows clean boot -- remove the Startup group, the RUN= and LOAD= lines in the WIN.INI file, and go back to standard VGA, keyboard, and mouse drivers.

10.	If the problem is occurring with a distributed application, the .ESO or .ESL files may be corrupted. Replace the support libraries to resolve this problem.

11.	Issue the CHKDSK command at the MS-DOS prompt to check for lost allocation units. (Note: Do not run CHKDSK /F while Windows is running.)

12.	Try running FoxPro on a different machine to see if the problem is machine specific.

13.	If you are on a network, try running FoxPro locally to determine if it is a network problem.

14.	 Reinstall FoxPro.


Compatible Caches

Below is a list of the disk-caching programs that are compatible with FoxPro. The products are listed in alphabetical order by product name. For more information about improving FoxPro's performance with a disk cache, refer to FoxPro's online Help system and the FoxPro "Developer's Guide."

Note: This list is current as of 03/31/92.

With the exception of our own products, Microsoft does not endorse or recommend any of the products listed here over others in the same area. We provide this information only as a convenience for our customers and do not provide warranties of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

CompaqCache 1.6 Compaq Computer P. O. Box 692000 Houston, TX 77269-2000 (800) 345-1518	QCache 6.0 (386MAX) Qualitas, Inc. 7101 Wisconsin Avenue, Suite 1386 Bethesda, MD 20814 (301) 907-6700
NCache 6.01 Symantec Corporation 10201 Torre Avenue Cupertino, CA 95014 (408) 253-9600	SMARTDrive 4.0 Microsoft Corporation One Microsoft Way Redmond, WA 98052-6399 (206) 882-8080
PC Cache 7.1 (PC Tools) Central Point Software 15220 NW Greenbrier Parkway, Suite 200 Beaverton, OR 97006 (503) 690-8090	Super PC-Kwik 4.1 Multisoft Corporation 15100 SW Koll Parkway Beaverton, OR 97006 (503) 644-5644
PowerCache Intelligent Devices (714) 920-9551


ASIN(): Out of Range

The expression you have used with the arc sine function has a value that is out of the range of -1.0 to +1.0.


Attempt to lock file

An attempt has been made to lock a file.

Refer to the SET REPROCESS command in the FoxPro 2.5 "Language Reference" (page L3-983).

Refer to the section about multiuser programming in the "Developer's Guide" (for FoxPro 2.0, page D18-17; for FoxPro 2.5 for MS-DOS, page D16-6; and for FoxPro 2.5 for Windows, page D19-6).

More Information

The automatic locking commands call an ON ERROR routine depending upon the setting of SET REPROCESS, but the manual locking commands do not call an ON ERROR routine.

When SET REPROCESS is set to 0 (the default), an ON ERROR routine will be called when you attempt to lock a record or file instead of the error message "Attempting to Lock...Press escape to cancel" being generated.

If SET REPROCESS is set to AUTOMATIC or -2 and the initial lock fails, the system message "Attempting to Lock...Press escape to cancel" will be displayed. When ESC is pressed, the ON ERROR routine is called.

When manual locks [LOCK(), FLOCK(), RLOCK()] are used, if SET REPROCESS is set to 0, the system message "Attempting to Lock...Press escape to cancel" is not displayed and the ON ERROR routine is not called.

If SET REPROCESS is set to -2 and manual locking commands are being used, the system message "Attempting to Lock...press escape to cancel" will be displayed. If ESC is pressed, the ON ERROR routine will not be called. The manual locking commands do not call an ON ERROR routine because they simply return a logical .T. or .F. value indicating whether the file is locked.


Attempt to move file to different device

A file cannot be renamed to a different device.


Attempt to use FoxPro function as an array

FoxPro encountered a function when it was expecting an array name. To correct this, replace the function with a valid array name.


Bad array dimensions

Either an illegal value (such as zero) has been entered during the declaration of an array, or an array has been declared that exceeds 65,000 elements.


Bad drive specifier

An invalid drive name was specified in a DIR command.


Bad .LIB file

One of the files in the Microsoft FoxPro 2.5 Distribution Kit has become corrupted. Reinstall the Distribution Kit.


Bad width or decimal place argument

Either the length or a decimal argument was invalid in the STR() function.


Bar position must be a positive number

An attempt has been made to define bars of a menu or a popup using a negative number.


Beginning of file encountered

The record pointer was positioned before the first record in the file.


Beyond string

An attempt was made to access characters beyond the last byte of a string memory variable or table field.


Browse table closed

A Browse window's table was closed by a BROWSE validation routine.


Browse structure changed

The structure of a Browse window was changed by a BROWSE validation routine.


CANCEL/SUSPEND is not allowed

The dBASE IV report or label file you are running calls upon a SUSPEND command. CANCEL and SUSPEND cannot be issued from within a report.

Check any user-defined functions (UDFs) used within the report design for the CANCEL or SUSPEND commands and remove them. Do not attempt to debug a UDF from within the Report Writer.

To allow the user to interrupt generating a report, place a UDF as a field object in the Detail band of the report.

For example, to create a UDF to interrupt a report, place a field named STOP() in the Detail band of the report. Create the following program named STOP.PRG in the same directory as your report:

SET TALK OFF

IF CHRSAW()

     WAIT CLEAR

     IF LASTKEY()=13

         SET TYPEAHEAD to 0

         DEFINE WINDOW stopit FROM 10,10 TO 14,60 DOUBLE

         ACTIVATE WINDOW stopit

         x=0

         @ 1,5 SAY "Stop printing report" GET x ;

            PICTURE "@*H Yes ; No"

         READ

         IF x=1

            GO BOTTOM

         ENDIF

     ENDIF

     DEACTIVATE WINDOW stopit

ENDIF

SET TALK ON

SET TYPEAHEAD TO 20

Note: SET TYPEAHEAD prevents FoxPro from referring to the ENTER key already in the keyboard buffer (the print action calls the Print dialog box with the PROMPT command).

The first time you run the code, you must press the ESC key to cancel printing. The second time, and every time thereafter, if you press ENTER when the report is in process, a dialog box prompts you for the appropriate action.


Cannot access selected table

An attempt was made to select a table outside the range 1 to 25 or 225, or a reference was made to a file variable in a table that is not open.

This error can occur when you are trying to exit of a screen by using a push button. If this is the case, check the code that is contained in the VALID clause for the button. The code is probably closing database files before the CLEAR READ command is issued.


Cannot activate OLE server

The OLE object you are trying to modify was created on another machine and the server is not installed on this machine, or the server cannot be found because the server is not in the MS-DOS search PATH, or there is insufficient Windows memory to launch the server application.


Cannot allocate screen map

There was not enough memory to run FoxPro.


Cannot append from password-protected file

The file you are attempting to append is encrypted.


Cannot build APP/EXE while suspended

A program specified in the project is suspended. To build the .APP or .EXE file, cancel execution of the suspended program.


Cannot build APP/EXE without a main program

The main program in the specified project cannot be found. A program file must contain the DOT under the file type if it is the main program file. The program can be set as the main program file by doing the following:

1.	Select the program file from the project that you want to be the main program.

2.	From the Project menu, choose Set Main.


Cannot clear menu in use

An attempt was made to clear an active menu with the CLEAR MENU or RELEASE MENU command.


Cannot clear popup in use

An attempt was made to clear an active menu popup with the CLEAR POPUP or RELEASE POPUP command.


Cannot convert Memo file for a read-only table file

This message appears when you try to perform a read-only operation on a dBASE IV-style memo field because FoxPro cannot convert a memo in a read-only operation.


Cannot create file

The operating system has returned an error to FoxPro indicating that the new file cannot be created. This error is usually caused by a full disk or directory, the entry of an invalid file name, or not having the proper requirements (such as access rights) needed to access the directory that is to contain the file.


Cannot create file <file>

The operating system has returned an error to FoxPro indicating that the new file cannot be created. This error is usually caused by a full disk or directory, the entry of an invalid file name, or not having the proper requirements (such as access rights) needed to access the directory that is to contain the file.

Note: If you try to generate screen code using the FoxPro screen generator, FoxPro generates the error message "Cannot Create file GENSCRN.FXP."  This error message appears when FoxPro cannot create the GENSCRN.FXP file in the main FoxPro directory. This problem may occur when FoxPro is on a network and create rights to the main FoxPro directory do not exist.

When FoxPro runs a .PRG file, it compiles the .PRG file and creates the compiled .FXP version. If you do not have create access rights to the main FoxPro directory, FoxPro cannot create the .FXP file, which is GENSCRN.FXP in this case.

A similar error ("Cannot create file GENMENU.FXP") occurs if you try to generate menu code from the menu generator.


Cannot create program workspace

FoxPro was not able to create enough workspace upon startup. This may be due to insufficient access rights to a network directory or not enough disk space.

To troubleshoot this problem, do the following:

1.	Make sure you have enough disk space.

2.	Make sure the FoxPro temporary files are directed to a drive that has enough disk space, and make sure a full path is given for the location of the temporary files (for example, C:\TEMP -- not just TEMP). If the temporary files are directed to a network, check your access rights to the network share. Make sure you have at least these rights (Create, Write, Scan, Delete).

3.	Set the FILES= setting in the CONFIG.SYS file to 99.

4.	If you are on a Novell network, check the FILEHANDLES= setting in the NET.CFG or SHELL.CFG file. Raise the setting, or create one and make sure it is located in the same location where NETX is being called.

5.	Make sure this line is in the AUTOEXEC.BAT file:

SHARE /L:500 /f:5120

6.	Check the amount of available conventional memory.

7.	Start FoxPro with the -C option so that the configuration file is not used.


Cannot do I/O with EMS

FoxPro cannot do low-level functions with expanded memory.

To avoid this problem, do the following:

1.	See if QEMM is loaded with the Stealth option (that is, ST:); if so, disable Stealth. Stealth works fine on some machines but not all. It tries to grab more memory than what it can actually have; therefore, it sometimes causes this error.

2.	Use the Extended (32-bit) version of FoxPro for MS-DOS (FOXPROX.EXE).


Cannot find OVL
Cannot find OVL file

The overlay file for FoxPro for MS-DOS (Standard version only) has been deleted or removed.

1.	Try using the OVERLAY= command in the CONFIG.FP file. By having this command in the CONFIG.FP file, the overlay file will automatically be copied or updated in the specified directory.

2.	Reinstall the Standard (16-bit) version of FoxPro for MS-DOS (FOXPRO.EXE).


Cannot find screen/menu generation program

The GENSCRN or GENMENU programs that create menus and screens cannot be located.


Cannot find spell check program

The spelling checker program specified in _SPELLCHK cannot be located.


Cannot GROUP by aggregate field

There has been an attempt to GROUP by one of the aggregate functions: MIN(), MAX(), SUM(), AVG(), COUNT(), NPV(), STD(), or VAR().


Cannot import from password-protected file

The file you are attempting to format is encrypted.


Cannot load PROAPI16.EXE

This error occurs only in the Extended (32-bit) version of FoxPro 2.0 for MS-DOS. It can be caused by lack of conventional memory, DOSMEM=ON, or the PROAPI16.EXE file not being in the MS-DOS search path.

1.	Remove DOSMEM=ON from the configuration file.

2.	Increase the amount of available conventional memory.

3.	In the CONFIG.SYS file, make sure COMMAND.COM be located properly (for example, SHELL=C:\DOS\COMMAND.COM C:\DOS\  /p).

4.	Make sure the PROAPI16.EXE file has been distributed with the .EXE file.


Cannot locate COMSPEC environment variable

An environment variable needed by FoxPro cannot be found. This error usually occurs when you try to run FoxPro from within another program and the other program doesn't properly pass MS-DOS environment variables.


Cannot locate desirable version

Causes

A version of FoxPro has been installed that the FoxPro loader program cannot run.

FOX -ZEK was used to start the version of FoxPro that is in the current directory.

Note: Installing the supplemental programs could also give you this error message.

Solutions

Note: The FoxPro loader program will try to run the following versions of FoxPro when the following conditions are met:

Standard Version of FoxPro

Operating system is earlier than MS-DOS 3.0

Processor is earlier than an 80386

DPMI-compliant server present (Windows 386 enhanced mode)

EMS is less than 2 MB

If LIM 4.0 compliant, EMS is not available (PM=NO)

XMS less than 2 MB

Ext less than 2 MB

Extended Version of FoxPro

EMS greater than 2 MB and VCPI-compliant server present.

1.	The FoxPro loader program checks the system to determine which version of FoxPro to run; if it cannot find this version or the incorrect version has been installed, you will get this error message.

2.	-ZEK is an undocumented switch that tells the FoxPro loader program to look only in the current directory and if this version is incorrect, you will get this error message.

3.	When you are installing the supplemental programs, FoxPro uses the FoxPro loader program to determine which version of FoxPro to use to install the supplemental programs; if this version cannot be found or is not installed, you will get this error.


Cannot open configuration file

FoxPro found a configuration file but did not have the proper rights to open it.


Cannot open file "<file>"

FoxPro cannot open the file you requested. The file may be locked by another user on a network.


Cannot read from drive X
Cannot read from drive X (or any other letter)

To solve this problem, try the following:

1.	Check the LASTDRIVE= setting in the CONFIG.SYS file.

2.	Can Windows or MS-DOS access the drive? (Use Fdisk to remove the drive if it is not needed).

See also Sharing Violation Reading Drive.


Cannot redefine menu in use

An attempt was made to issue a DEFINE MENU command while there was an active menu in memory. You must first issue a DEACTIVATE MENU command.


Cannot redefine popup in use

An attempt was made to issue a DEFINE POPUP command while there was an active popup in memory. You must first issue a DEACTIVATE POPUP command.


Cannot rename current directory

The directory you have flagged in the Filer could not be renamed.


Cannot run on MS-DOS before version 3.0

Loaders and compact .EXE files cannot be run under MS-DOS version 3.0 or earlier.


Cannot SET FORMAT while in a READ with a format file

The format file you have specified calls upon a format file.


Cannot update file

This error appears only if a critical problem occurs when writing to the disk, such as space exhausted, total disk failure, and so on.


Cannot write to a read-only file

An attempt was made to write to a file that was created or accessed for read-only purposes.


COLORSET resource not found

An attempt has been made to SET COLOR SET TO a color set not found in the resource file.

1.	Make sure the correct resource file (FOXUSER.DBF) is being used.

2.	The FoxPro 2.0-generated code contains the command SET COLOR SET TO <color set name>. The color set name is stored in the FoxPro 2.0 FOXUSER.DBF file and is not available in the version 2.5 or later FOXUSER.DBF file.

To make the color set available in FoxPro 2.5 or later, do the following:

In FoxPro 2.0:

SET RESOURCE OFF

USE c:\foxpro2\foxuser

COPY TO c:\foxpro2\temp FOR id="COLORSET"

USE

SET RESOURCE ON

In FoxPro 2.5 or later:

SET RESOURCE OFF

USE c:\foxpro25\foxuser

APPEND FROM c:\foxpro25\temp

USE

SET RESOURCE ON

DO c:\foxpro25\goodies\misc\fixuser.app

See also the "Developer's Guide" and "Language Reference."


Column number must be between 0 and 255

The printer column number specified is off the page.


Column number must be between 0 and right margin

There was an attempt to set _PCOLNO to an invalid number.


COLUMN/FORM/ALIAS/NOOVERWRITE/WIDTH allowed only with FROM clause

These options are available only when you create a quick report with the FROM clause.


COLUMN/ROW/ALIAS/NOOVERWRITE/SIZE/SCREEN allowed only with FROM clause

These options are available only when you create a quick screen with the FROM clause.


Compiled code for this line too long

The object code produced for this statement exceeded the size of the FoxPro internal code buffer. This line contains too many long expressions and must be subdivided into multiple statements. The maximum length of a compiled line is 1024.

The error is usually caused by using headings or pictures. However, there is no way to determine how FoxPro will compile the line. The only solution is to reduce the size of the line.


Constant is already #defined

The constant has already been defined with #DEFINE but not yet undefined with #UNDEF.


CONTINUE without LOCATE

An attempt was made to execute a CONTINUE command without first executing a LOCATE command.


CPU exhibits 32-bit multiply problem

An early version of the Intel 80386 chip is being used. Please check with your hardware vendor before continuing.


Cyclic relation

A circular relationship was attempted by defining a sequence of relations that eventually points back to a table that is already related. (In other words, Table A is the selected database and you are trying to create a relationship back into Table A, therefore causing a cyclic relation.)


Data type mismatch

An expression was considered to be invalid by FoxPro because it is composed of data types that cannot be evaluated together. Either the appropriate data type required by a FoxPro statement was not used, or the two fields specified in an operation between two tables did not have the same data type (for example, a numeric field must be evaluated against a numeric field in an UPDATE, REPLACE, SET RELATION, or so on operation).

The FoxPro ASORT() function sorts an array into ascending or descending order. When an application uses the ASORT() function, all the elements in the array must have the same data type (character, numeric, date, or logical). Otherwise, the ASORT() function causes a "Data type mismatch" error.


Database is not ordered

One of the following situations has occurred:

An index for the database file was not selected when an UPDATE command, using the RANDOM clause, was encountered.

A FIND/SEEK was attempted against a nonindexed database or while SET ORDER TO 0 was in effect.

An attempt was made to SET RELATION with a nonnumeric relational expression to a nonindexed database or while SET ORDER TO 0 was in effect.


Database record is trashed

FoxPro is checking for a variable reference that points to a table but the table is closed. (This is an old dBASE error message.)


DESCENDING not permitted on IDX files

.IDX index files do not support the DESCENDING clause.


Display mode not available

An attempt was made to select an unavailable display mode.


Division by 0

Zero was specified as the second argument in the MOD() function.


DO nesting too deep

The maximum DO program nesting levels of 32 has been exceeded.

To troubleshoot this problem, do the following:

1.	Check for ON KEY LABEL not being shut off.

2.	Check the current DO level. DO levels are incremented as follows:

When a DO program1 command is issued in the Command window, the DO level is set to 1.

If program1 includes a DO program2 statement, the DO level is incremented to 2. The DO level is incremented each time another DO program statement is executed. In this scenario, program1 would be referred to as the calling program, and program2 as the called program.

If a called program returns to a calling program, either by executing all commands in the called program, or by explicitly issuing a RETURN command, the DO level is decremented by 1.

The following procedure allows you to determine the current DO level through use of the SYS(16) function. The SYS(16) function returns the name of the currently executing program. It also allows an optional numeric argument that indicates from how many levels back the program name should be fetched.

1.	Create a program named DOLVL.PRG with the following commands:

* Memory variable used:

* current - name of currently executing program

* do_ctr - counter that indicates current DO level

current = SYS(16)

do_ctr = 1

DO WHILE .T.

   IF SYS(16,do_ctr) <> current

       do_ctr = do_ctr + 1

   ELSE

       * In FoxBASE+ or FoxPro 1.02, remove the word "WINDOW"

       * in the following command

       WAIT WINDOW "Current DO level is " + STR(do_ctr,1,0)

       EXIT

   ENDIF

ENDDO

2.	Save and execute the program. The message "Current DO level is 1" will be displayed.

3.	Create a program named TEST.PRG with the following command and execute the program:

DO dolvl.prg

The message "Current DO level is 2" will be displayed.


Duplicate field names

In the FIELDS clause for SORT and COPY, you have specified a duplicate name in the list of fields.


Dynamic memory exhausted

To troubleshoot the problem, do the following:

1.	Check the amount of conventional memory available. This error may be caused by not having enough conventional memory available to build the .EXE file. The WATCOM linker (WLINK8.EXE) uses conventional memory.

2.	Check to see if DOSMEM=ON is in the configuration file. If so, remove it.

3.	Try adding /NUMHANDLES=n to the HIMEM.SYS statement in the CONFIG.SYS file (for example, DEVICE=C:\DOS\HIMEM.SYS /NUMHANDLES=128).

Note: NUMHANDLES=n specifies the maximum number of extended-memory block (EMB) handles that can be used simultaneously. Valid values for n are in the range 1 through 128. Default is 32. Each additional handle requires 6 bytes of resident memory.

See also Clean Boot.


End of file encountered

The record pointer was positioned past the last record in the file. This error also occurs if an empty database file is used when you are trying to run an .SPR (generated screen) file, because there are no records for the READ command to display.


ENDTEXT without TEXT

An ENDTEXT statement is missing a corresponding TEXT statement.


Error copying OLE object to Clipboard

There is not enough available Windows memory.


Error creating OLE object

There is not enough available Windows memory, or FoxPro can't find the server application.

Note: In Microsoft Windows version 3.0, appending a Paintbrush object to a FoxPro for Windows general field causes this error; for example, APPEND GENERAL <fieldname> FROM \<path>\<filename>.bmp.

This error occurs because Paintbrush is not an OLE server in Windows 3.0. An appropriate OLE server is required to embed or link files of a specific type in general fields.


Error in label field definition

An invalid expression was encountered in a LABEL file (.LBX).


Error reading resource

This message indicates an internal error.

See General Troubleshooting Tips.


Error saving OLE object

There is not enough available disk space or Windows memory to save the object.


Exclusive open of file is required

An attempt was made to perform an operation that requires exclusive use of the table. For example:

PACK

-or-

INDEX w/CDX


Expression evaluator fault

This is an internal consistency check failure in the FoxPro expression evaluator. This error may be caused by a damaged FoxPro object code file.

Delete the offending .SPR, .SPX, .MPR, .MPX,  or .FXP file and then recompile the program that caused the error.


Fatal error <expN> reporting error <expN>

FoxPro has insufficient memory to continue. This may possibly be caused by a virus, but it is most often associated with an insufficient amount of conventional memory before starting FoxPro.

1.	Free up as much MS-DOS memory as possible and restart FoxPro.

2.	Scan the hard disk and network for viruses.

3.	Make sure FOXSWAP.COM (and if you are running FoxPro 2.0, PROAPI16.EXE) is in the main FoxPro directory or the application/executable directory.

4.	Issue a SYS(12) to check the amount of conventional memory.

5.	Release any windows, variables, and so on not currently in use.

Note: Typically this error is operating system related -- check for the specific error message and troubleshoot for a lack of memory, disk space, and so on.


Feature not available

The FoxPro feature that you have attempted to use is not supported under the version of FoxPro being used. This error also occurs in a distributed .EXE file if macro substitution has been used, because FoxPro has encountered a line of code that cannot be executed in its current form.

1.	If the error occurs in an .EXE file, create a procedure called Dummy. (This procedure is never called. Its purpose is to pull in the necessary code for the stand-alone .EXE file to avoid the error.) In this procedure, have the MODIFY and SELECT statements. For example:

PROCEDURE dummy

SELECT * FROM test

MODIFY COMM test

2.	Eliminate macro substitution all together.

3.	The MODIFY QUERY and CREATE QUERY commands return "Feature not available" error messages when they are called from an executable file built with the FoxPro Distribution Kit. The MODIFY QUERY and CREATE QUERY commands are intended only for use in the interactive development environment of FoxPro.

End users must possess the full product in order to access these commands.

Note: To work around this, use the RQBE window to construct a SQL SELECT statement, then copy the results from the See SQL window and paste them into a .PRG file. Using this method, you can also create a RQBE-like screen/window that contains variables that can be used in the SQL SELECT statement.

The following sample code demonstrates this workaround:

dbfname = space(12)

value = space(12)

fieldname = space(12)

@ 5,5 SAY "Enter the database name: " GET dbfname

@ 7,5 SAY "Enter the fieldname: " GET fieldname

@ 9,5 SAY "Enter the value: " GET value

READ

fieldname = ALLTRIM(fieldname)

dbfname = ALLTRIM(dbfname)

value = ALLTRIM(value)

SELECT &fieldname from &dbfname ;	&& Macro expansion is OK here.

     WHERE &fieldname = (value) ;	&& Parentheses ARE required here.

INTO cursor query

BROWSE

See also the Distribution Kit manual.


Field must be a general field

An attempt has been made to enter a field that is not a general field with APPEND/MODIFY GENERAL, or a field that is not a general field has been entered in the Screen Picture or Report Picture dialog box.


Field must be a memo field

An attempt has been made to enter a field that is not a memo field with the APPEND/COPY MEMO command.


"Field" phrase not found

The field specified in PROMPT <field> was not found.


File access denied

An attempt was made to write to a file that is write-protected by the MS-DOS ATTRIB command. This error can also occur when you are using the MS-DOS COPY command.

Also check for the following:

1.	If you are using FoxPro on a network, check to see if someone else has the file opened exclusively.

2.	Quit and restart FoxPro and try to use the file again.

3.	Try adding /NUMHANDLES=n to the HIMEM.SYS statement. (for example, DEVICE=C:\DOS\HIMEM.SYS /NUMHANDLES=128).

Note: NUMHANDLES=n specifies the maximum number of extended-memory block (EMB) handles that can be used simultaneously. Valid values for n are in the range 1 through 128. Default is 32. Each additional handle requires 6 bytes of resident memory.

4.	If you are using the COPY FILE command when you are getting this error message, you must include the file name for the destination. For example, if you use the following command, you will get the error message:

COPY FILE customer.dbf TO D:\foxpro2

To correct this problem, use the following command instead:

COPY FILE customer.dbf TO D:\foxpro2\JOE.dbf

If you are using LANtastic, check the following items:

1.	Check the amount of files and locks on the MS-DOS SHARE command. Recommended settings:

SHARE /F:5120 /L:500

2.	Make sure the .EXE and .OVL files are marked as read-only.

3.	Make sure that the CONFIG.FP file on the server redirects OVERLAY= to a directory other than the directory where FOXPRO.EXE resides.

If you are using Novell, check the following items:

1.	Check your user access rights. You need to have Read, Write, Modify, Scan, and Delete rights.

2.	Log in as a supervisor and try the same operation. If this works, the system administrator needs to give you more rights.


File aready exists
File already exists

The filename to which you are attempting to rename a file already exists. This error is usually generated by the MS-DOS RENAME command.


File cannot be locked

FoxPro cannot lock the requested file. It may already be locked by another user on the network.


File close error

An error was returned by the operating system while FoxPro was attempting to close a file.


File ["<file>"] does not exist

The file you have specified does not exist, or it is not in the default directory.

Issuing the command APPEND FROM <cursor file> causes the error message "File <cursor file> does not exist" to appear.

Note: This error message occurs because the APPEND FROM command requires a database name. The cursor file is the alias for a database. Therefore, referring to the database name instead of the alias will resolve the error, as shown in this example:

APPEND FROM DBF('cursor file')


File internal consistency error

See General Troubleshooting Tips.


File is in use by another

An attempt was made to USE, DELETE, or RENAME a file that is being used by another user on a network.

To avoid this error:

1.	Set EXCLUSIVE to OFF on all machines.

2.	Make sure the FoxPro files are read-only (that is, the .EXE files, .FON files, the resource file, and the configuration file).

3.	Load the MS-DOS SHARE command with the parameters /F:5120 /L:500.

4.	Make sure SQL creates an exclusive table.


File is in use

An attempt was made to USE, DELETE, or RENAME a file that is currently open.

This error can also be caused when there is a conflict with the resource file (FOXUSER.DBF); to avoid this error, mark the file attribute for the resource file as read-only on the server.

This error can also occur when you are running on a network and another user has the file opened exclusively. In this case, make sure EXCLUSIVE=OFF is in the configuration file (if each user has a CONFIG.FP(W) file, EXCLUSIVE=OFF has to be in each file).


File is open in another work area

Commands that require exclusive use of a table (PACK, MODIFY STRUCTURE, ZAP, and so on) cannot be performed on a table that has been opened in multiple work areas with the USE AGAIN command.


File is read-only

An attempt was made to write to a read-only file.


File is the wrong version

An attempt has been made to open a screen or a report file that is not a FoxPro 2.5 file.


File must be opened exclusively to convert memo file

The table file you are using must be opened exclusively in order to be able to convert the memo file.

Issue the SET EXCLUSIVE ON command before opening the table or issue a USE <table> EXCLUSIVE command.


File not open

An attempt was made to read from or write to a file that is not currently open.

Check for the following situations:

1.	Possible corrupt index file. Delete and recreate the index file.

2.	If deleting the index file allows access to the database, create a new structure for the database file and append the records from the previous database. (This procedure will work only if there was a problem with a corrupt index pointer in the header).

3.	Try using the COPY FILE command (for example COPY FILE CUSTOMER.DBF to TEST.DBF). Make sure the .FPT file is copied as well, if there is one.

4.	Check for cross-linked files. (Run CHKDSK or a defragment utility on the hard disk drive. Note: Do not run CHKDSK /F while Windows is running.)


File read error

An error was returned by the operating system while FoxPro was attempting to read a file.


File was not LOADed

An error occurred when attempting to CALL or RELEASE a module that was not LOADed.


File write error

An error was returned by the operating system while FoxPro was attempting to write to a file. Most often, this error is the result of an attempt to write to a write-protected floppy disk.


FILTER expression too long

An attempt was made to SET FILTER TO an expression that is longer than the maximum allowable size of 160 characters.


FILTER requires a logical expression

An attempt was made to SET FILTER TO an expression that is not a logical expression.


FOR/WHILE need logical expression

A FOR or WHILE clause within a command does not contain a logical expression.


Foreign node found during compaction

See General Troubleshooting Tips.


FoxPro(x) hangs upon exiting

Check for the following:

1.	Make sure the FoxPro temporary files are located in an appropriate location (preferably the C drive).

2.	Start FoxPro with the -C option. This stops FoxPro from using the configuration file (CONFIG.FP[W]). Something in the CONFIG.FP(W) file could be causing the problem.

3.	Make sure the resource file (FOXUSER.DBF) isn't corrupt. Rename the current FOXUSER.DBF file and restart FoxPro. A new resource file will be created.

4.	Make sure there are no quotation marks on the TMPFILES setting in the CONFIG.FP(W) file. For example, make sure you have TMPFILES=C:\ instead of TMPFILES="C:\".

5.	Make sure Novell NETX is dated February 1992 or later.


FOXUSER file is invalid

Your FOXUSER.DBF file has been corrupted. Rename the current FOXUSER.DBF and restart FoxPro. A new FOXUSER.DBF file will automatically be created.


Free handle not found

See General Troubleshooting Tips.


Function not yet implemented

You have attempted to call a function that is not supported in the current version of FoxPro.


IF/ELSE/ENDIF mismatch

An ELSE or ENDIF statement does not have a corresponding IF statement.


Illegal operation for general field

An attempt has been made to perform an invalid operation, such as calculation, indexing, and so on, on a general field.


Illegal operation for memo field

An INDEX command cannot specify a memo field as its key expression.


Illegal printer driver recursion

Your printer driver program calls upon the printer driver.


Illegal seek offset

An error has caused FoxPro to attempt to position a pointer before the beginning or after the end of file.

Check for the following:

1.	Corrupt indexes. Delete the indexes and recreate them.

2.	Possible file corruption. Create a new structure and append the records from the old database. (COPY STRUCTURE might actually copy the corrupted information, which is why a new structure is suggested).

3.	If you are using the RUN command, use the /0 switch instead of the /128 (or whatever number) switch -- /0 resets the environment information whereas /128 does not necessarily do so.

4.	Make sure you are not using any other memory-swapping utilities (for example, Auto Swap). If so, disable the memory-swapping utility.


Illegal value

An expression specified by SET MEMOWIDTH, BROWSE, or an @ ... TO command evaluated to an illegal value.

If the error occurs in FoxPro 2.0, make sure you have the most recent version of 2.0. (This was a problem under earlier versions of 2.0 but has been corrected.)


Import only Worksheet A for Lotus 1-2-3 version 3.0 files

Worksheets B and C cannot be imported into FoxPro because a table is two-dimensional.


Improper data type in field expression

A picture data type was encountered by REPORT for a field expression.


Improper data type in group expression

A picture data type was encountered by REPORT for the group expression.


Incompatible memory manager

The error occurs when you are attempting to load the Extended (32-bit) version of FoxPro. FoxPro 2.0 uses Virtual Control Program Interface memory (VCPI), which is not compatible with what is being run currently. (FoxPro 2.5 is DOS Protected Mode Interface [DPMI] compliant).

To avoid this problem, do one of the following:

Obtain the most recent release of FoxPro 2.0 (June 9).

Take the NOEMS option off the memory manager.

Remove the memory manager all together.


Incorrect handle found during compaction

See General Troubleshooting Tips.


Index does not match table file. Recreate index

A damaged structure within an index file has been detected.


Index expression is too big

The index expression for this index exceeds the maximum length of 100 bytes.


Index file does not match table

The index expression for the current index uses variables that are not contained within the current table.


Index tag not found

The tag you have specified could not be found in the index.


Index tag or file name must be specified

You have attempted to exit the Index dialog box without specifying a tag name.


Insufficient memory

There was not enough memory for FoxPro to complete an operation.

You may receive one of the following error messages when you attempt to start FoxPro for Windows:

Insufficient memory

Not enough memory for application (minimum 2187264 required)

Not enough memory for application (minimum 2158592 required)

Note: FoxPro for Windows versions 2.5 and 2.5a generate different "Not enough memory for application (minimum <x> required)" error messages, where <x> is the amount of memory. For version 2.5, <x> is 2158592; for version 2.5a, <x> is 2187264.

To troubleshoot the problem, check for the following:

1.	Possible corrupt file. Restore the file from a backup.

2.	Increase the size of the Windows swap file. In Windows 3.1, do the following:

a.	From the Main group in Program Manager, run Control Panel, and then choose the 386 Enhanced icon.

b.	Choose the Virtual Memory button.

c.	Choose the Change button.

d.	Select the type of virtual memory you want to use (Temporary or Permanent) from the Type list box, then enter a larger size in the New Size box. The new swap file does not take effect until Windows is restarted.

3.	If an Expanded Memory Specification (EMS) emulator is in use, remove it or reduce the amount of expanded memory it provides. EMM386.EXE, provided with MS-DOS and Windows, has this emulation capability.

4.	Reduce the size of your disk-caching software. Windows cannot use the extended memory that a disk cache is using. SMARTDRV.EXE is the disk cache provided with MS-DOS and Windows.

5.	Increase the percentage of available memory allocated to FoxPro for Windows in the MEMLIMIT statement in the CONFIG.FPW file.

6.	Make sure that a valid path exists for the temporary files that FoxPro creates, and make sure that there is at least 5 MB of room available for the creation of these temporary files.

7.	Use the PIF Editor, located in the Main group in Windows 3.1, to open the FOXRUN.PIF file, which is located in the FoxPro development directory (usually FOXPROW). Decrease the KB Required value for any or all of the following areas: Memory Requirements (conventional memory), EMS Memory, or XMS Memory.

8.	The Extended (32-bit) version of FoxPro cannot recognize any extended memory if the total amount of available extended memory is greater than 32 MB. To correct this problem do the following:

1.	Specify a memory manager in the CONFIG.SYS file and configure the system to make 32 MB of expanded memory available. For example, the following command line configures EMM386 in this manner:

DEVICE=C:\DOS\EMM386.EXE RAM 32768

2.	Create RAM disks to use the extended memory in excess of 32 MB. Each RAM disk can hold up to 32 MB.


Insufficient stack space

FoxPro's available stack space was exceeded. One of the following situations can cause this error message:

Nesting too many BROWSE commands in combination with ON KEY LABEL commands or too many Browse windows open.

Issuing a SHOW GETS in a READ-level SHOW clause (remove it).

Having a DO .MPR command in the Setup code of a menu.

In addition, check the following:

1.	Increase the STACKS command in the CONFIG.SYS file.

2.	Increase the amount of available conventional memory.

3.	Make sure the FoxPro temporary files are located in a proper place (preferably the C drive).

4.	Increase the amount of memory available to FoxPro.

Tip: Try running the code in conjunction with the Debug window with the PROGRAM() function included to see what is being held at each level in the stack.

Note: There can be up to two additional READ levels after the command SET PDSETUP TO ' ' is issued. The first READ command is issued when you enter the Printer Driver Setup dialog box. The second READ command is issued when you enter the Printer dialog box. If RDLEVEL() is greater than or equal to 4 when you are proceeding into any one of the two dialog boxes, the "Insufficient stack for printer driver setup" error will occur in the Standard (16-bit) version. The Extended (32-bit) version will display the error "Current read level too high."  The programs that check the READ levels are in GENPD.PRG and PD_SETUP.SPR in the VALID clause for the push buttons.

Solution

When you are using the Standard version, make sure the READ level is not greater than 2 when you issue the SET PDSETUP TO ' ' command. With the Extended version, make sure the READ level is not greater than 3 when you issue SET PDSETUP TO ' '.


Internal consistency error

See General Troubleshooting Tips.


Internal error: Too many characters in report

The total size of all the headings and expressions defined for the report in CREATE/MODIFY REPORT is too large to be contained in the standard report file.


Internal .LIB undefined symbol error

The library file is corrupted or the library version does not match the FoxPro version.


Invalid box dimensions

Row 2, column 2 must be larger than row 1, column 1 when using the @ ... BOX command.


Invalid BROWSE

This error message occurs when you make changes to the database file (for example, adding or deleting fields from the file) and then try to issue a BROWSE command from the Database menu. (The BROWSE command on the Database menu issues a BROWSE LAST command, which does not show the changes that have been made).

To correct this problem, do the following:

1.	Issue the BROWSE command from the Command window.

2.	If necessary, reindex the database file.


Invalid buffdirty call

See General Troubleshooting Tips.


Invalid buffpoint call

See General Troubleshooting Tips.


Invalid character in command

The source line contains an invalid character. This is probably caused by control characters embedded in the source line by an external editor.


Invalid compact EXE file. Rebuild EXE

Your .EXE file has become corrupt. Rebuild the file.


Invalid table number

Attempt has been made to select a table number not in the range from 1 to 225.


Invalid DIF file header

The .DIF file header of the file you are attempting to import is incorrect.


Invalid DIF type indicator

The .DIF file you are attempting to import has an invalid data type indicator.


Invalid DIF vector -- DBF field mismatch

The .DIF file you are attempting to import has an internal conflict between its header and its data. (This was a problem in the 1991 releases of FoxPro 2.0; this problem has been corrected in all current releases).


Invalid Excel version 2.0 file format

The Excel file you are attempting to import is either not version 2.0 or has been corrupted.


Invalid field width or number of decimal places

The field width or number of decimal places you have specified is not valid. Check the System Capacities table in the FoxPro "Developer's Guide" for a list of the requirements.


Invalid file descriptor

FoxPro is attempting to do file I/O on a file that is not open or is invalid.

Note: The following error message will occur in FoxPro 2.5 for MS-DOS. It appears to occur in the Standard (16-bit) version only. If you have a Browse window open, and you use the LEFT ARROW or HOME key to move from any field other than numeric to any numeric field, you will get this error message. This problem has been corrected in FoxPro 2.5b.

Check for the following:

Possible cross-linked files. Defragment the hard disk and run CHKDSK at the MS-DOS prompt. (Note: Do not run CHKDSK /F while Windows is running.)

Possible problem with memory. As a last resort, check to see if the machine memory is bad.


Invalid function argument value, type or count

A value passed to a function is either not of the expected data type, or the value of the argument is out of range for this function. This may also be caused by passing too many arguments to a function.


Invalid index number

An attempt was made to SET ORDER TO a position in the index file list that is not occupied.


Invalid keyboard macro file format

An attempt has been made to use a macro file with invalid data.


Invalid key length

An invalid index key length has been specified. The length of a key for an .IDX index must be between 1 and 100 characters. The length of a key for a .CDX index must be between 1 and 254 characters.


Invalid .LIB signature

The library file used to construct the .EXE file was corrupted.


Invalid Lotus 1-2-3 version 1.0 file format

The Lotus 1-2-3 file you are attempting to import is either not version 1.0 or has been corrupted.


Invalid Lotus 1-2-3 version 2.0 file format

The Lotus 1-2-3 file you are attempting to import is not version 2.0. Use the Lotus conversion utility to convert the file to version 2.0 before attempting to import it.


Invalid Lotus 1-2-3 version 3.0 file format

The Lotus 1-2-3 file you are attempting to import is either not version 3.0 or has been corrupted.


Invalid Multiplan version 4.0 file format

The Multiplan file you are attempting to import is either not version 4.0 or has been corrupted.


Invalid or corrupted OLE object

The data stored in a general field for an OLE object cannot be validated.


Invalid or duplicate field name

You have attempted to create a field in a table that already has that name, or you have used the characters ., ", /, \, [, ], :, |, <, >, +, =, ;, *, ?, or a blank or a space in a field name.


Invalid or missing EXE file

The .EXE file you have specified either is corrupt or you don't have sufficient access rights to use it.


Invalid operation for CURSOR

An attempt was made to PACK a cursor.


Invalid Paradox version 3.5 file format

The Paradox file you are attempting to import is either not version 3.5 or has been corrupted.


Invalid path or file name

You've attempted to execute a FoxPro command that contains an invalid path or filename.


Invalid pointer

The pointer for the database file has become corrupted. To correct this problem, reindex. If that does not work, delete and recreate the index.


Invalid preprocessor expression

Only simple expressions (evaluation, concatenation, and math) are allowed in preprocessor (#IF and so on) commands.


Invalid printer redirection

Either a path to a printer is not established or the print device cannot be shared. Check the command being used by the network (that is, \\machine, \\spooler).


Invalid SET expression

An invalid argument has been used with the SET() function.


Invalid Symphony version 1.0 file format

The Symphony file you are attempting to import is either not version 1.0 or has been corrupted.


Invalid Symphony version 1.1 file format

The Symphony file you are attempting to import is either not version 1.1 or has been corrupted.


Invalid subscript reference

A subscript was used that is outside the valid range of array subscripts defined in the DIMENSION statement. This error may also be caused by using two subscripts with a one-dimensional array.


Invalid SYLK file dimension bounds

The file you are attempting to import is indicating invalid rows or columns -- it is out of bounds.


Invalid SYLK file format

The file you are attempting to import is not in a valid SYLK file format.


Invalid SYLK file header

The file header of the file you are attempting to import has an incorrect SYLK file header.


Invalid variable reference

A function was used where a memory variable was expected. This error is caused by using a valid function name or abbreviation as an array name.


Invalid WINDOW file format

The window save file (.WIN) being restored contains invalid data.


I/O operation failure

FoxPro attempted to access a drive that was either not ready or did not exist. This error can be caused by a lack of disk space or bad spots on a disk.

To resolve this problem, do the following:

1.	Make sure there is enough disk space for the FoxPro temporary files.

2.	Run CHKDSK (to check for cross-linked files). (Note: Do not run CHKDSK /F while Windows is running.)

3.	Use a defragment utility to check for bad sectors on the hard disk.


Key label ["<label>"] is invalid

The key label you have used is not supported. See ON KEY LABEL for a list of supported key labels.


Key string too long to fit

The character expression included with KEYBOARD is too long. Reduce its length.


Key too big

The compiled version of the index expression has exceeded 150 bytes.


Label file invalid

An attempt was made to modify or print labels using a label file that was not created with CREATE/MODIFY LABEL.

1.	Create a new label.

2.	Copy the label objects to a new label (that is choose Select All, then Copy, and then Paste from the Edit menu).


Label nesting error

A user-defined function in a label form has called LABEL FORM.


Left margin plus indent must be less than right margin

The sum of the specified left margin and paragraph indent exceeds the right margin. (Or, the total of the print system memory variables _LMARGIN and _INDENT must be less than _RMARGIN).


Library file is invalid

FoxPro cannot use the library file you've specified. Rebuild the library.


Line too long

The maximum length for a command line (2048 bytes) has been exceeded. Macro substitution may have caused the line to expand beyond the 2048 byte limit.

Note: Under certain circumstances, when a very long SET FILTER expression is in effect, the DISPLAY STATUS command generates a "Line Too Long" error. The exact length of the expression required to cause this error has not been determined. This problem was corrected in the March 25, 1992 release of FoxPro 2.0.

Workaround

Use a UDF to decrease the number of items on the line. For example, if you're getting the error message when doing a query, do the following:

SELECT * FROM customer WHERE sqltest()

sqltest.prg:

IF cno = 'dddd' then

   RETURN .T.

ELSE

   RETURN .F.

ENDIF

Note: Running an RQBE session on a table with a large number of fields will produce error 18, "Line too long," every time the Do Query button is chosen after a field was moved up in the Output Fields box. This problem occurs because the resulting SELECT statement would exceed the maximum command-line length, which is 2048 characters.

This problem occurs because RQBE generated a SQL statement of SELECT * FROM <table_name> before the order of the fields changed; however, after the order of the fields changed, it had to create a SQL statement similar to the following:

SELECT <fld1>, <fld2>,....<fldn> FROM <table_name>

If the field order is not changed in the Output Fields box, the error does not occur. Therefore, to avoid the problem, do not change the order of the fields.


Link command failed

A compilation error occurred and an .EXE file was not created on the disk.

To avoid this problem, do the following:

1.	Remove the DOSMEM statement from the CONFIG.FP(W) file.

2.	Increase the FILES= statement in the CONFIG.SYS file.

3.	If you are on a Novell network, increase the FILE HANDLES= setting in the NET.CFG or SHELL.CFG file. (The file should be loaded from the same place as NETX.)

4.	Make sure there is enough disk space available.

5.	Make sure COMMAND.COM can be located. For example, add SHELL=C:\DOS\COMMAND.COM C:\DOS\  /p (/p is the permanent option switch) to the CONFIG.SYS file.

6.	Make sure FoxPro is in the MS-DOS search path. (Preferably toward the beginning, in case the path exceeds the 127-character limit and is truncated.)

7.	Make sure the path for temporary files exists and is valid.

8.	Make sure WLINK8.EXE, PROAPI16.EXE (FoxPro 2.0 for MS-DOS only), and FOXSWAP.COM are in the path.

9.	Free up conventional memory and load device drivers into upper memory.

See also Clean Boot.


Line number must be less than page length

The line number used falls beyond the page length memory variable. (The print system memory variable _PLINENO must have a value less than _PLENGTH).


Localized product required for this environment

This error message occurs if you run earlier releases of the domestic version of FoxPro 2.0 with a foreign keyboard loaded. In the past, you either had to exchange the domestic version for a local version or remove the foreign keyboard driver. However, this is no longer necessary. As of the June 9, 1992, release of version 2.0, Microsoft FoxPro is a worldwide edition. The internal check for foreign keyboards has been removed from the product.

To obtain new or updated Microsoft products, call the Microsoft Sales Information Center at (800) 426-9400. If you are outside the United States, contact the Microsoft subsidiary for your area. To locate your subsidiary, call Microsoft International Customer Service at (206) 936-8661.


LOG(): Zero or negative

A zero or a negative number has been used as the argument of the natural LOG() function.


LOG10(): Zero or negative

A zero or a negative number has been used as the argument for a base-10 logarithm.


Logical expression required

The expression provided in the Expression Builder must be of logical type in this instance.


Macro not defined

An attempt has been made to play a macro that does not exist.


Maximum allowable menu items (128) exceeded

The maximum number of items that can be contained in a menu (128) was exceeded.


Maximum allowable menus (25) exceeded

The maximum number of menus that can be defined (25) was exceeded.


Maximum number of popup bars is 32760

A DEFINE BAR statement or DEFINE POPUP statement has tried to create a bar with a number higher than 32760.


Maximum record length exceeded in import file

The file you are attempting to import has a record length greater than 4001 bytes.


Meaningless use of expression

The expression in SET FILTER TO has been reentered while the filter is executing. This can happen with complex setups involving SET RELATION or SET FILTER, or during the use of FoxPro functions or user-defined functions that reference other work areas, such as LOOKUP() or SEEK().


MEMO file is missing/invalid

An attempt was made to use a table file whose associated memo file (.DBT or .FPT) was deleted, cannot be found, or is corrupted. (This problem can be caused by abnormal termination, such as from a power outage or rebooting during execution.)

Workaround

Create a new file with the extension .FPT that contains one field (a memo field). Rename <newfile>.FPT to <oldfile>.FPT. This will allow you to access the database file. (However, there will now be blank memo fields for each record). To save the original memo information, use a file repair utility, such as FPT.FIX in Library 5 on CompuServe. For more information, see File Repair Utilities.


File Repair Utilities

The CompuServe FoxForum contains a number of freeware and shareware utility programs for recovering damaged memo field data files. These utilities are supported by the third-party developers that wrote the utilities, not by Microsoft.

WARNING: The utilities on the list below have not been tested by Microsoft. The products included here are manufactured by vendors independent of Microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability.

Files Available in the FoxForum Library

Name:	FPTFIX.PRG

Title:	Memo File Fixer - Improved version

By:	Hank Costello

Library:	LIB 5

Description:	Improved version of FPTFIX with more options. Fixes both file pointer and blocksize bytes as required. If you order the source code for this utility, you also receive a program that works with FPTFIX2 to check all .FPT files and to fix damaged files.

Name:	CHKFPT.COM

Title:	Display information about .FPT and help diagnose corruption

By:	Pete Olympia

Library:	LIB 5

Description:	Length-damaged FoxPro memo field utility to display all information about .FPT file and help diagnose memo file data corruption. Includes block size, next available block, if the link is incorrect, and the correct link. For each memo field and database record, the utility shows memo field length and whether it is picture, text, or corrupted.

Name:	MEMOPL.INF

Title:	MemoPlus (listed below)

By:	Pete Olympia

Library:	LIB 10

Description:	MemoPlus is a set of utilities for Xbase memo file handling. Supports all Xbase dialects including FoxPro 2.0. Can diagnose and repair corrupt memo files automatically. Can import, export, and pack memo field data in MS-DOS. You can also edit memo fields using your own text editor.

Name:	DTools

Title	Diagnose and repair damaged .FPT and .DBF files (listed below)

By:	EL Software

Library:	LIB 10

Description:	DTools repairs FoxPro .DBF and .FPT files, and is the only utility that works on 64K records. It also works while other users are on the network, and can rebuild headers from a preloaded data dictionary.

Commercial Utility Programs

dbFileFix (Norton Utilities)

Symantec Corporation

(310) 449-4900

dSALVAGE

Comtech Publishing, Limited

P.O. Box 12340

Reno, NV  89510

(702) 825-9000

DTools

EL Software

3809 Plaza Drive, #107-360

Oceanside, CA  92056

(619) 439-6617

(619) 439-9612 (fax)

HeadFix or QuickFix-2

Hilco Software

11266 Barnett Valley Road

Sebastopol, CA  95472-9555

(707) 829-5011

MemoPlus

Rory Data International

17 Thornburn Road

North Potomac, MD 20878

(301) 251-0497

(301) 258-6862 (fax)


Memory variable file is invalid

An attempt was made to RESTORE FROM a file that is not a valid memory (.MEM) file.


Menu file invalid

The menu file you have specified has become corrupted.


Menu has not been activated

An attempt has been made to select from a menu before it has been activated.


Menu has not been defined

An attempt has been made to activate a menu that has not been defined.


Menu is already in use

An attempt has been made to activate a menu that is already active.


Menu item cannot be defined

An attempt was made to add a menu bar to a prompt that was defined with files or structure.


Menu item cannot be released

An attempt was made to release a prompt that was defined with files or structure.


Menu items/titles must be type CHARACTER

A menu item or menu title was encountered that was defined with a data type other than character.


Menu manager internal consistency error

See General Troubleshooting Tips.


Menu/Popup was not pushed

An attempt has been made to pop a menu or popup that was not pushed.


Mismatched #IF/#ELSEIF/#ELSE/#ENDIF

An incomplete or incorrect #IF preprocessor command has been included.


Mismatched braces in key label

A left or right brace is missing from a key label.


Mismatched case structure

A CASE, ENDCASE, or OTHERWISE statement does not have a corresponding DO CASE statement.


Missing #ENDIF

An #IF command has been issued without a matching #ENDIF.


Missing (

A function name is missing a left parenthesis.


Missing )

A function name is missing a right parenthesis. Either the current line contains a left parenthesis that has not been matched, or the function contains too many arguments and thus the right parenthesis is going undetected.


Missing ,

FoxPro was expecting a comma and one was not found. This is usually caused through failure to include the proper number of arguments with a function.


Missing expression

A valid expression was expected, but not found.


Missing operand

An operator that requires two operands was used without the second operand, such as ? (13+4)/.


Missing .RTT section

The Microsoft FoxPro 2.5 Distribution Kit was not properly installed. Reinstall.


MULTISELECT/MOVER not supported for PROMPT style popup

Commands that have the clauses PROMPT FIELD, PROMPT FILE or PROMPT STRUCTURE do not allow the clauses MULTISELECT or MOVER.


Must be an array definition

A DIMENSION statement contains a variable declaration without the required subscript arguments.


Must be a character, date or numeric key field

The key field used to UPDATE ON must be character, date, or numeric.


Must be a file variable

A file variable (field) was used where a memory or array variable was required. For example:

EDIT FIELDS m.test   && This will give the error message.


Must be a memory variable

A memory variable or an array variable was used where a file variable (field) is required. For example:

STORE "TEST" TO test.fld   && This will give the error message.


Nested aggregation not allowed

Nesting of the aggregate functions MIN(), MAX(), SUM(), AVG(), COUNT(), NPV(), STD(), or VAR() is not allowed in FoxPro 2.5.


Nesting error

One of these situations has been encountered:

A DO is present without a matching ENDDO or vice versa.

A SCAN is present without a matching ENDSCAN or vice versa.

A FOR is present without a matching ENDFOR or vice versa.

A LOOP or EXIT clause is present outside of the DO WHILE ... ENDDO, FOR ... ENDFOR or SCAN ... ENDSCAN commands.


Nested key labels are invalid

You cannot nest key labels.


No bars have been defined for this popup

You must define bars for each popup.


No table is in USE

A table was not in use at the time FoxPro attempted to execute a table command.


No fields to process

No fields can be found, usually because a SET FIELDS TO command was in effect.


No fields were found to copy

During an attempt to COPY to a file, no visible fields were found.


No memory for buffer

It is impossible to allocate memory for a buffer. This message is very unusual and will occur only in situations where available memory is extremely limited. You should consider adding memory or removing some memory-resident programs to give FoxPro more working memory.


No memory for file map

It is impossible to allocate memory for a FoxPro internal resource. This message is very unusual and will occur only in situations where available memory is extremely limited. You should consider adding memory or removing some memory-resident programs to give FoxPro more working memory.


No memory for file name

It is impossible to allocate memory for a FoxPro internal resource. This message is very unusual and will occur only in situations where available memory is extremely limited. You should consider adding memory or removing some memory-resident programs to give FoxPro more working memory.


No menu bar defined

An attempt has been made to READ a menu bar that has not been defined.


No pads defined for this menu

An attempt has been made to activate a menu that has no pads.


No PARAMETER statement found

After a program with a parameter list has been executed, the called program must begin with a PARAMETER statement.


No popup menu defined

An attempt has been made to activate a light-bar menu before defining a light-bar.


No previous PRINTJOB to match this command

An ENDPRINTJOB command was encountered without a matching PRINTJOB command preceding it.


No such menu/item is defined

The value or values passed to a READ MENU TO or READ MENU BAR TO command do not correspond to a defined menu or menu item.


Not a character expression

An attempt was made to CALL a module with an expression whose value is not of the type character.

1.	If the error occurs on the startup of FoxPro, remove STATUS=ON or SCOREBOARD=ON from the CONFIG.FP(W) file and put it in the program file.

2.	If the error occurs on a READ CYCLE statement in a screen, look for a return value(s) in the MESSAGE clause. For example, if a field is added to a screen and in the MESSAGE clause, if you leave it as procedure and add the following line of text

WAIT WINDOW "this is a test"

the screen will run fine until it gets to the field that contains the MESSAGE clause. You will then receive the error message because FoxPro is looking for a literal string.

To correct this problem, use the following code:

WAIT WINDOW "this is a test"

RETURN ""

The key to getting the MESSAGE clause to work when you are using a procedure is to issue a RETURN "".


Not a table/DBF file

The file that FoxPro is attempting to use as a table contains an improper header. (The file is corrupted).

See File Repair Utilities.


Not a numeric expression

An attempt was made to use the SUM command on a nonnumeric field.

Note: During an attempt to use the CALCULATE() function in a FOR loop, the error message "Not a Numeric Expression" may occur. This error is caused by the CALCULATE() function looking for an actual field name rather than evaluating the expression.

The code example below demonstrates the problem and how to correct it.

The following code produces the above error message. The NUMBERS.DBF database used in the example is of indeterminate length and has "f" number of fields, all numeric.

USE numbers IN A

SELECT A

F=FCOUNT('numbers')

DIMENSION outarray(F,2)

FOR i = 1 TO F

   CALCULATE SUM(FIELD(i)), AVG(FIELD(i)) ;

      TO outarray(i,1), outarray(i,2)

ENDFOR

DISPLAY MEMORY LIKE outarray     && used for debugging

To obtain the desired results, you must include the EVALUATE() function, as follows:

USE numbers IN A

SELECT A

F=FCOUNT('numbers')

DIMENSION outarray(F,2)

FOR I = 1 TO f

   CALCULATE SUM(EVAL(FIELD(I))), AVG(EVAL(FIELD(I))) ;

      TO outarray(I,1), outarray(I,2)

ENDFOR

DISPLAY MEMORY LIKE outarray


Not a user-defined window

You have attempted to perform a command containing a WINDOW clause on window that was not created by a user, for example, the Command window.


Not a valid Framework II database/spreadsheet

The file you are attempting to import is not a valid Framework II file format.


Not a valid RapidFile database

The file you are attempting to import is not a valid RapidFile file format.


Not enough disk space for "<filename>"

The operating system has returned an error to FoxPro indicating that there is no room on the disk to contain the data from the latest WRITE command. This error is also erroneously returned under certain versions of Novell when you try to extend a file that has no owner.

To resolve this problem, do the following:

1.	Increase the FILES= statement in the CONFIG.SYS file.

2.	If you are on a Novell network, increase the FILE HANDLES= setting in the NET.CFG or SHELL.CFG file.

3.	Make sure there is enough disk space available.

4.	Make sure the FoxPro temporary files are properly placed (preferably on the C drive).

5.	Run CHKDSK at the DOS prompt to check for cross-linked files (that is, CHKDSK /F). (Note: Do not run CHKDSK /F while Windows is running.)

6.	If your CONFIG.SYS file or AUTOEXEC.BAT file loads the SHARE program, increase the values specified in the /F and /L parameters to the following:

SHARE /F:5120 /L:500

7.	If you are in a Novell NetWare environment, issue the NDIR command. If FoxPro had failed to access a file where the owner is listed as "N/A," give the file a proper owner.


Not enough disk space

The operating system has returned an error to FoxPro indicating that there is no room on the disk to contain the data from the latest WRITE command. This error is also erroneously returned under certain versions of Novell when you try to extend a file that has no owner.

To resolve this problem, do the following:

1.	Increase the FILES= statement in the CONFIG.SYS file.

2.	If you are on a Novell network, increase the FILE HANDLES= setting in the NET.CFG or SHELL.CFG file.

3.	Make sure there is enough disk space available.

4.	Make sure the FoxPro temporary files are properly placed (preferably on the C drive).

5.	Run CHKDSK at the DOS prompt to check for cross-linked files (that is, CHKDSK /F). (Note: Do not run CHKDSK /F while Windows is running.)

6.	If your CONFIG.SYS file or AUTOEXEC.BAT file loads the SHARE program, increase the values specified in the /F and /L parameters to the following:

SHARE /F:5120 /L:500

7.	If you are in a Novell NetWare environment, issue the NDIR command. If FoxPro had failed to access a file where the owner is listed as "N/A," give the file a proper owner.


Not enough memory to USE table

There was not enough memory to open an additional table.


Not suspended

A RESUME command was used without first suspending a program.


NOWAIT/SAVE/NOENVIRONMENT/IN/WINDOW clauses not allowed with FROM

These clauses cannot be included when you create a quick report with the FROM clause.


Numeric overflow (data was lost)

A mathematical operation resulted in a number that was too large to be stored in the field or variable in which it was placed.


Object "<file>" is the wrong version

The object file is out of date and the source code cannot be located.


Operator/operand type mismatch

An arithmetic, string, or logical operator or function is being used with an invalid data type. This error would occur, for example, if you were to attempt to add two logical values.

Example 1

The INDEX ON command returns an "Operator/operand type mismatch" error message when concatenating a character field with a logical field as in the following example

INDEX ON <name>+<log> TO NAMELOG

where <name> is a character field and <log> is a logical field.

These fields are not of the same data type; therefore, a conversion must be performed to make them compatible. Since there is no function that translates a character string into a logical string or vice versa, the following command is recommended

INDEX ON NAME+IIF(LOG=.T.,"T","F") TO NAMELOG

where the Immediate IF (IIF) statement returns a "T" if the logical expression is .T. and an "F" if it is not.

Example 2

Comparing a date type field with a literal character string in the FOR clause of a BROWSE command may result in the error message "Operator/Operand Type Mismatch."

To solve this problem, do one of the following:

Use the CTOD() function to convert the literal character string to a date type, as follows:

USE invoices

BROWSE FIELDS ino, cno, idate FOR idate > CTOD("05/22/90")

Place the date within braces ({}) as follows:

USE invoices

BROWSE FIELDS ino, cno, idate FOR idate > {"05/22/90"}

This error is returned because a literal character string is a character type field rather than a date type field. For example, the following statement

USE invoices

BROWSE FIELDS ino, cno, idate FOR idate > "01/01/91"

where "idate" is a date type field in the database, returns the above error.


OS memory error

There is a problem with your MS-DOS free memory chain. The problem occurs because of the behavior of the DOS Ergo Extender. This behavior is by design.

To solve this problem, you must write a batch file to release the memory.


PAD has not been defined

A reference has been made to a pad that does not exist.


Picture error in GET statement

The PICTURE clause within an @  ... SAY ... GET statement contains a picture that cannot include the value to be formatted. This error may be occurring because the picture is in error or because the value to be formatted does not match the picture.


Picture too big, corrupt, or wrong format

There was an attempted use of an invalid picture file.

The limit for an @ ... GET PICTURE clause is 255.

The error can occur when you try to insert a picture or .BMP file in a screen or when you are using an @ ... SAY command.

This error is caused by not having enough memory available in the user memory pool.

In order to use .BMP files that are 1024 x 768 and 256 colors or larger, you must set the MEMLIMIT minimum to 3072 (MEMLIMIT=90,3072,4096). For resolutions below 1024 x 768, you should have the MEMLIMIT minimum set to 2048 (MEMLIMIT=90,2048,4096). These minimum limits will vary from picture to picture.


POPUP has not been activated

An attempt has been made to select a pad from a popup before the popup has been activated.


POPUP has not been defined

An attempt has been made to activate a popup before it has been defined.


POPUP is already in use

An attempt has been made to activate a popup that is already activated.


POPUP is too small

The popup window is too small to display selection bars. You will have to define a larger popup.


Popup too big, first <expN> entries shown

Too many items have been specified to be shown in the popup.


Position is off the screen

A row or column number specified in an @ command is larger than the number of rows or columns on the screen, window or printer. It is possible that the error is being caused by the font that is being used.


PREVIEW clause not allowed with OFF/NOCONSOLE or TO PRINT/FILE

Page preview is not allowed when the console is not on or when you are printing to a printer or a file.


Printer driver is corrupted

An attempt has been made to load a printer driver that is corrupted.

Check the following:

1.	If you are using Novell, make sure that SHARE is loaded after NETX.EXE in the AUTOEXEC.BAT file.

2.	Try rebuilding GENPD.PJX. (Rebuild the project [choose Rebuild All] and then rebuild GENPD.APP.)

3.	If the .EXE file uses procedures that manipulate printer drivers then the following procedure may resolve the problem:

Edit GENPD.APP to use DRIVER.PRG instead of DRIVER2.PLB. (This will solve the problem only if DRIVER2.PLB is the only library file being used. If you are loading another library or a BIN routine, one of the other steps will be required.)

To modify GENPD.APP to use DRIVER.PRG instead of DRIVER2.PLB, do the following:

a.	Open the GENPD.PJX file in the GOODIES\PDRIVERS subdirectory.

b.	Edit GEN_PD.PRG.

c.	From the Edit menu, choose Find, and search for "DRIVER.PRG" (without the quotation marks).

d.	Delete the asterisk from the following line:

(_PDRIVER = "DRIVER.PRG")

e.	Comment out the IF... ELSE ... ENDIF statement after "* and make the lines below a comment" and before the ENDIF preceding the following statement:

IF TYPE("_PDPARMS")

f.	Close GEN_PD.PRG, save the changes, and rebuild the project and application. (Note: Be sure to save GENPD.APP in the FoxPro directory or in the directory returned by ?_GENPD.)


Printer driver not found

The specified printer driver could not be located.

Make sure that GENPD.APP can be located or is available.


Printer not ready

The printer device specified is currently not accessible or the printer is timing out. The TIME parameter in your FoxPro configuration file may need to be increased.

FoxPro for MS-DOS

Try increasing the TIME parameter in the CONFIG.FP file (for example, TIME=1000000).

Try putting the MODE command in the AUTOEXEC.BAT file (for example,  MODE LPT1:,,P). This command causes the print operation to continually retry until the printer accepts output.

FoxPro for Windows

In the Control Panel, run the Printers icon, and choose the Connect button. In this dialog box, increase the device not selected setting to 99 (maximum setting). (This option specifies the amount of time [in seconds] that Print Manager continues to check the printer to see if it is online and ready to print. Increase this setting to 99 [the maximum setting] and it should work.)

When you execute the command REPORT FORM xxxxxx TO FILE xxx.TXT in FoxPro for Windows, the error "Printer not ready" occurs. If you are using a SCSI hard disk drive, conflicts with the SCSI controller may cause this error. By inserting the line

DEVICE=C:\WINDOWS\SMARTDRV.EXE /DOUBLE_BUFFER

in the CONFIG.SYS file and clearing the 32-Bit Disk Access check box in the Windows Control Panel (run the 386 Enhanced icon and choose the Virtual Memory button), the FoxPro for Windows REPORT FORM command should function normally.


PRINTJOBs cannot be nested

After encountering a PRINTJOB command, an ENDPRINTJOB command was not found before another PRINTJOB command was encountered.


Procedure "<procedure>" not found

The procedure specified with the IN clause of the DO command could not be located.


Product has not been properly installed

Please reinstall your copy of FoxPro.


Product in use by another

The single-user copy of FoxPro you have specified to run is being used by another user (FoxPro 2.0 only).


Program too large

The program that FoxPro is attempting to load will not fit into memory. The largest program or individual procedure FoxPro can load is one containing 65,000 bytes.


Project file is invalid

The project file specified has become corrupted.


PROMPTs for this popup have already been defined

An attempt has been made to use the BAR option to define the contents of the popup. The popup has already been defined with the PROMPT option.


Queue "<queue>" not found

The queue specified in the SET PRINTER TO command cannot be found.


Record is in use by another

An attempt has been made to write to a record that is locked by another user. The record must be UNLOCKed before it can be accessed.


Record is in use. Cannot write

FoxPro is trying to write a record, but it cannot because the record was not locked.


Record is not in index

A key field of the table in use has been modified without the index having been active. To correct this, REINDEX the table file or recreate the index. If that doesn't solve the problem, check for possible memory corruption.


Record is not locked

An attempt was made to BROWSE, CHANGE, EDIT, DELETE, GATHER, MODIFY MEMO, READ, RECALL, or REPLACE a record that was not locked.


Record is out of range

The record number that you are attempting to access is beyond the actual number of records contained in the current table.

Check the following:

1.	Check to see if you are using the demonstration activation key. If so, reinstall FoxPro with the live key. (The demonstration key allows only 120 records -- FoxPro 2.0 and earlier).

2.	Make sure the index is not out of date. Reindex if it is.


Record not available

A table, index, or memo file cannot be accessed because another user has started a transaction that is not yet complete. FLOCK() and RLOCK() normally do not prevent other users from reading the locked information. This message, which scrolls from left to right to indicate that FoxPro is still active, was added for compatibility with Novell's transaction-tracking system (TTS).

Note: The error message should appear only when the system uses the TTS, which is built into Novell NetWare. This message should not appear when FoxPro is running on a network other than NetWare.


Record too long

While you are attempting to create a table file, the maximum length for the data portion of a record (65,500 bytes) was exceeded. The length of the data portion of a record is equal to the sum of the lengths of the individual record fields.


Recursive macro definition

The maximum number of macro substitutions (256 in any one statement) has been performed in the current line. The probable cause of this error is that a macro references itself.


Relational expression too long

The compiled version of the relation expression has exceeded 60 bytes.


Report file invalid

A report description contains an error. You may be trying to open an UNTITLED.FRX on top of an existing UNTITLED.FRX. If this is the case, delete UNTITLED.FRX from the Command window.

If this isn't the case, check the following:

1.	The .FRT file may be missing or corrupt. In this case, recreate the report.

2.	A dBASE III report was IMPORTed and has been edited or saved without renaming it to the report .FRX extension.


Report nesting error

A user-defined function in a report form has called REPORT FORM.


Required clause not present in command

A command was used without a clause that was required by the FoxPro syntax.


Resource file unavailable

The resource file cannot be located or has been removed.

1.	Check the configuration file to see if the RESOURCE= statement is pointing to the right place.

2.	Create a new FOXUSER file. (Rename the current FOXUSER.DBF and .FPT to something else and then restart FoxPro. A new FOXUSER.DBF will be created.)


RUN/! command failed

The operating system has returned an error to FoxPro indicating that it cannot create a process to execute a RUN command.

Check the following:

1.	Take the DOSMEM statement out of the CONFIG.FP(W).

2.	Increase the FILES= statement in the CONFIG.SYS file.

3.	If you are on a Novell network, increase the FILE HANDLES= setting in the NET.CFG or SHELL.CFG file.

4.	Make sure there is enough disk space.

5.	Make sure COMMAND.COM can be located. For example, add SHELL=C:\DOS\COMMAND.COM C:\DOS\  /p to the CONFIG.SYS file.

6.	Make sure FoxPro is in the MS-DOS search path. (Preferably toward the beginning, in case the path exceeds the 127-character limit and is truncated.)

7.	Try using FOXSWAP.COM (issue RUN /0 to invoke FOXSWAP.COM) and make sure it is in the main FoxPro directory.

8.	Edit your CONFIG.SYS and AUTOEXEC.BAT files to free as much conventional memory as possible. (See Clean Boot.)

9.	For FoxPro version 2.0 for MS-DOS, verify that the PROAPI16.EXE file is in the main FoxPro directory. (FoxPro version 2.5 for MS-DOS includes this functionality within FOXPRO.EXE itself.)


RUN/! command string too long

The command string included with the RUN command is too long. The maximum length allowed is approximately 240 characters.


Screen code too large for memory

The screen object you are trying to copy has a code snippet larger than 64K.


Screen file invalid

The screen file specified has become corrupted.


SELECTs are not UNION compatible

Data types or the sizes of the fields being projected in each SELECT statement are not identical. The number of columns may be different.


Server "<server>" not found

The server specified with the SET PRINTER TO command could not be found.


SETUP.INI missing or invalid

FoxPro for Windows writes to the first floppy disk during installation. If the first disk is write-protected, the above error will occur during installation. When you choose the Cancel button, another error message appears stating "The SETUP.INI file is missing or damaged."

To correct the problem, remove write-protection from the first disk and run the Setup program again.

If this does not correct the problem, a new set of disks will be needed.


Sharing Violation Reading Drive

If the error occurs when you are trying to start up FoxPro, the problem is with one of the FoxPro files.

Check the following:

1.	Make sure that each user has a FOXUSER.DBF file, or make sure the FOXUSER.DBF and .FPT files on the server are read-only.

2.	Make sure that the CONFIG.FP(W) file on the server includes the RESOURCE=OFF and EXCLUSIVE=OFF statements. (EXCLUSIVE=OFF makes it possible to share database files.)

3.	If FoxPro for MS-DOS, mark the .EXE and the .OVL files as read-only. In FoxPro for Windows, mark the .FON and .EXE files as read-only.

4.	Make sure that Windows is installed on the machine or that the users are running a shared copy of Windows.

5.	If you are using the Distribution Kit to create a stand-alone application, verify that the .EXE files are marked as read-only.

6.	If you are creating compact executable files, mark the .ESL and .ESO files as read-only.

7.	In some cases, the MS-DOS SHARE program must be loaded on the server and on each workstation. Specify the /F and /L parameters as follows:

SHARE /F:5120 /L:500

Note: When Central Point Anti-Virus version 1.x is installed and the user runs an executable file created with FoxPro, a "Sharing violation on drive X:" error occurs. In this case, do the following:

1.	Use the MS-DOS ATTRIB command to set the Read-Only attribute for the executable file.

2.	Disable Central Point Anti-Virus by editing the AUTOEXEC.BAT file to remove VSAFE.COM or by editing the CONFIG.SYS file to remove VSAFE.SYS.


Source code not found

The file you have specified cannot be located in the directory specified.


Source code out of date

The date source code you have specified does not match the compiled (.FXP) file.

1.	Issue the SET DEVELOPMENT ON command. (It is on by default.)

2.	If FoxPro cannot find the file, make sure the files can be found along the MS-DOS search path.


Source not available

1.	Issue the SET DEVELOPMENT ON command. (It is on by default.)

2.	If FoxPro cannot find the file, make sure the files can be found along the MS-DOS search path.

3.	From the Project menu, choose Options. Make sure Debugging information is checked and not Encrypt. (This is for .APP and .EXE files run in the Trace window).


SQL aggregate on non-numeric expression

There was an attempt to perform an average, sum, standard deviation, or variance on a nonnumeric field.


SQL canceled operation

There was an attempt to SELECT into a table when SAFETY was ON and the user chose not to overwrite the table.


SQL column "<field>|<variable>" not found

The field or variable you have specified cannot be found.


SQL could not locate table

The table specified could not be found.


SQL err building temporary index

A temporary index could not be built, possibly due to insufficient disk space.


SQL Error Correlating Fields

An outer-reference can only be in syntax similar to the following:

X = Y

Syntax such as X = Y + 1 or X = 5 will produce this error.


SQL expression too complex

FoxPro ran out of memory when it tried to expand the SELECT statement to analyze it.

Too many expressions have been placed in the IN clause. There is a limit of 24 expressions for the IN clause of the SELECT statement. The expression length does not affect the generation of this error message, only the number of expressions.


SQL illegal GROUP BY in subquery

When you are using one of the six operators +, -, *, /, < and >, there can only be one row of output.


SQL index not found

FoxPro could not find the existing index.


SQL internal error

A Structured Query Language (SQL) SELECT statement with an extremely long WHERE clause can cause the error message. If this is not the case, refer to General Troubleshooting Tips.

Note: Microsoft has confirmed this to be a problem in FoxPro 2.5 for MS-DOS and FoxPro 2.5 for Windows. This problem was corrected in FoxPro 2.5a for MS-DOS and FoxPro 2.5a for Windows.


SQL invalid * in SELECT

There was an attempt to use * in one of the aggregate functions of MAX(), MIN(), AVG(), or SUM().


SQL invalid aggregate field

There has been an attempt to do aggregation on a memo field.


SQL invalid DISTINCT

There must only be one DISTINCT used per level.


SQL invalid GROUP BY

There is an error in the GROUP BY clause.


SQL invalid HAVING

There is an error in the HAVING clause; for example, the clause does not contain a logical expression.


SQL invalid ORDER BY

One of the fields chosen for the ORDER BY is not in the SELECT list. This problem occurs only when you are using numeric indexing; for example:

SELECT a,b,c FROM table ORDER BY 4

The number chosen exceeds the number of fields selected.


SQL invalid predicate

There is an invalid operator in the SQL statement (FoxPro 2.0 only).

The operators can be Character (+ - $), Numeric [^ % () ** + - * /], Logical [! not () and or], or Logical expression relational (< > = <> # != <= >= ==).


SQL invalid SELECT statement

There is an error in the projection list.


SQL invalid SELECT

There has been an attempt to select more than one field in a subquery.


SQL invalid subquery

Something in the subquery is erroneous.


SQL invalid temporary file

The temporary file FoxPro created has become corrupted (FoxPro 2.0 only).


SQL invalid WHERE clause

There is an error in the WHERE clause.


SQL invalid use of subquery

A subquery was used in a place where it was not expected.


SQL invalid use of UNION in subquery

UNION is not supported in subqueries in FoxPro 2.5.


SQL no FROM clause

There must be a FROM clause in the SELECT command.


SQL open file failed

The file specified could not be opened (FoxPro 2.0 only).


SQL out of memory

FoxPro has run out of memory while trying to process your SELECT command.


SQL queries of this type are not supported at present

There was an attempt to perform a query that is not supported by FoxPro 2.5.


SQL statement too long

The object code is too long to be compiled.


SQL subqueries nested too deep

FoxPro 2.5 does not support nested subqueries.


SQL Too many columns referenced

No more than 256 columns total can be referenced in any SELECT command.


SQL Too many subqueries

The number of subqueries allowed in FoxPro 2.5 is two per SELECT.


SQL Too many UNIONs

The maximum number of UNIONs (10) has been exceeded.


SQRT domain error

The SQRT argument must not be negative.


Stack overflow -- expression too complex

In most cases, user-defined functions are nested too deep.

It is also possible that a SHOW GETS command is looping or recursively calling itself.


Statement not allowed in interactive mode

The commands IF, ELSE, ENDIF, TEXT, ENDTEXT, EXIT, RETRY, RETURN, SUSPEND, DO WHILE, ENDDO, DO CASE, ENDCASE, SCAN, ENDSCAN, FOR, and ENDFOR are not allowed in interactive mode (that is, they cannot be issued from the Command window).


String memory variable area overflow

The combined length of all memory variable strings has exceeded the amount of memory.


String too long to fit

The allowable string length was exceeded. This error can occur when you are importing a data file into FoxPro using the IMPORT or APPEND FROM commands.

To avoid this problem, do the following:

1.	Insert a carriage return or linefeed after each string of data.

2.	Make sure the length of a key for a .CDX index is between 1 and 254 characters.

This problem also occurs under the following conditions:

When you print a character expression longer than 254 characters on the screen using the ?/?? command, the SET MEMOWIDTH setting will be used to control word wrapping. If the @ ... SAY command is used the above error occurs.

The maximum size for character fields is 254 characters. If a character expression is less than or equal to 254 characters, the _WRAP variable setting will control how the variable is wrapped when it is displayed on the screen. If _WRAP = .F., the variable will wrap at the width of the current output window. If _WRAP = .T., the variable will be wrapped according to the _LMARGIN and _RMARGIN settings.

To work around this situation, you can use the SUBSTR() function to print the character expression in 254-character pieces. For example:

?SUBSTR(var,1,254)

??SUBSTR(var,255,254)

If the character expression is the result of concatenating variables, use the ?? command to continue the printing of each variable. For example:

?var1

??var2

??var3

Alternatively, you can use the SET MEMOWIDTH setting to increase the length of each line. For example:

SET MEMOWIDTH TO 75

? var1+var2+var3

If the prompt of a procedure contains more than 44 characters, GENMENU.PRG displays the "String too long to fit" message. The FoxPro limit is 254 characters in the prompt of a procedure; however, a maximum length of 44 characters has been set in GENMENU.PRG.

To work around this limitation, modify GENMENU.PRG so that the lines that read

\\<<REPLICATE(" ",44-LEN(m.place))>><<m.g_verti2>>

are commented out.

CAUTION: Modifications to the GENMENU program are not supported. If you modify this program to run with your application, you do so at your own risk.

After you receive the "String too long to fit" error message, issue a CLOSE ALL command to close the program being generated. This error message also appears with the GENSCRN.PRG file. Modifications to this file are also unsupported.


Structural CDX file not found

The structural index file associated with a table file could not be found.

The error is generated only when SAFETY is ON. This problem was corrected in the June 9,1992, release of FoxPro 2.0.


Structure invalid

In CREATE FROM, a table was specified whose structure does not match the STRUCTURE EXTENDED format.


Structure nesting too deep

The maximum structured programming command nesting of 64 levels has been exceeded.


Subscript out of bounds

An attempt was made to reference an array element with a subscript that is outside the range defined in the DIMENSION statement.


Subquery returned more than one record

Subqueries linked with the six normal operators <>, =, <=, >=, < or >, excluding ALL or ANY, can produce only a one-row result.


Syntax error

A command that is syntactically incorrect has been issued. Below are a few examples which illustrate this error.

A syntax error may be caused by a misspelled command or variable name.

A clause is not valid in the current context.

When defining public memory variables:

Memory variables must be declared public prior to assigning the value. If you assign a value to a memory variable and then later declare it public, you will get this error.

Use debug on the memory variable and see if it has a value prior to the section declaring the variable public. Use the Find feature to locate occurrences of the variable.

In FoxPro version 2.0 for MS-DOS, the following syntax example does not return an error message:

SELECT * FROM customer INTO CURSOR SYS(3)

SYS(3) assigns a numeric alias name (12345678). However, in FoxPro versions 2.5 and 2.5a for MS-DOS and Windows, the SYS(3) parameter returns "Syntax error" because a cursor cannot have a numeric name in versions 2.5 and 2.5a.

To use the SYS(3) function in FoxPro 2.5 and 2.5a for Windows and MS-DOS with the SELECT statement, use the following syntax:

SELECT * FROM customer INTO CURSOR "a" + SYS(3)

The "a" will prefix the alias of the query (a1234567).


Syntax error in field expression

An invalid expression involving a field has been issued.


System Resources Exhausted

To resolve this problem, do the following:

1.	Increase the FILES= statement in the CONFIG.SYS file.

2.	Increase the BUFFERS= statement in the CONFIG.SYS file.

3.	If you are on a Novell network, increase the FILE HANDLES= setting in the NET.CFG or SHELL.CFG file.

4.	Make sure SHARE.EXE is loaded for peer-to-peer networks with the following parameters:

SHARE /F:5120 /L:500

5.	Close any open windows and turn off borders.

6.	Try adding /NUMHANDLES=n to the HIMEM.SYS statement. For example:

DEVICE=C:\DOS\HIMEM.SYS /NUMHANDLES=128

Note: NUMHANDLES=n specifies the maximum number of extended-memory block (EMB) handles that can be used simultaneously. Valid values for n are in the range 1 through 128. Default is 32. Each additional handle requires 6 bytes of resident memory.

7.	If you are using LANtastic, make sure you have the latest version. According to Artisoft, if you are unsure if you have the latest version, you can verify this information by downloading README.TXT, PATCH.EXE, and PATCH.DBF from the FoxForum on CompuServe.

8.	Turn off any disk-caching utilities and shadow RAM, since these might cause FoxPro to lock up or corrupt files.

See also General Troubleshooting Tips.


Tab stops must be in ascending order

The tab stops defined for the system variable _TAB must be in ascending order.


Table (database) is not ordered

One of the following has occurred.

An index for the table file was not selected when an UPDATE command, using the RANDOM option, was encountered.

A FIND/SEEK was attempted against a nonindexed table or while SET ORDER TO 0 was in effect.

An attempt was made to SET RELATION with a nonnumeric relational expression to a nonindexed table or while SET ORDER TO 0 was in effect.


Table/DBF operation invalid while indexing

There has been an attempt to do a table operation inside an index user-defined function (UDF).


Target is already engaged in relation

A situation has occurred where there is more than one relationship between the currently selected table file and one of its targets.


Too few arguments

A function call contains less than the required number of arguments.


Too many arguments

A function call contains more than the permitted number of arguments.


Too many extensions specified

Too many file extensions have been included in a GETFILE(), LOCFILE(), or PUTFILE() function. The maximum number of file extensions you may include is 30.


Too many files open

FoxPro has attempted to open more than its internal limit of files.

Check the following:

1.	Increase the FILES= statement in the CONFIG.SYS file.

2.	If you are on a Novell network, increase the FILE HANDLES= setting in the NET.CFG or SHELL.CFG file.

3.	Make sure SHARE.EXE is loaded for peer-to-peer networks with the following parameters:

SHARE /F:5120 /L:500

4.	Try adding /NUMHANDLES=n to the HIMEM.SYS statement. (For example, DEVICE=C:\DOS\HIMEM.SYS /NUMHANDLES=128.)

Note: NUMHANDLES=n specifies the maximum number of extended-memory block (EMB) handles that can be used simultaneously. Valid values for n are in the range 1 through 128. Default is 32. Each additional handle requires 6 bytes of resident memory.

5.	Check the available disk space.

6.	Check for cross-linked files by running CHKDSK at the MS-DOS prompt. (Note: Do not run CHKDSK /F while Windows is running.)


Too many memory variables

The maximum number of memory variables that can be created has been exceeded.


Too many names used

As a program was being loaded or a table was being opened, FoxPro's name table overflowed. To correct this, divide the program into smaller modules.


Too many PICTURE characters specified

The amount of characters permitted in a PICTURE clause is limited by memory.

The GET field limit is 254 characters; if you need more characters, make it an EDIT field.


Too many PROCEDURES

The number of procedures is limited to the amount of memory you have.


Too many READs in effect

The maximum nesting level for READs (5) in effect has been exceeded. Switching between screens can cause the system to exceed this limit.

To work around this limitation, do one of the following:

Code the application to issue a CLEAR READ command to clear the read when the user switches to another data-entry screen rather than reissuing the read for the first data-entry screen.

Create a foundation READ. (Look at EX1.APP in the GOODIES\FNDATION subdirectory.)


Too many records BROWSE/EDIT in demo version

The maximum number of records you can BROWSE or EDIT in the demo version of FoxPro is 120. When FoxPro was installed, the demonstration activation key was used instead of the live activation key. Reinstall FoxPro using the live activation Key.

Note: Under FoxPro 2.5, this error no longer exists because the serial number and the activation key are no longer needed.


Too many relationships

Too many relationships have been established between database files. Decrease the number of relations between open database files.


Total field type must be numeric

A report expression that includes a total specification is not numeric type.


Total label width exceeds maximum allowable size

The LABEL command detected a condition where the sum of the individual label widths plus separating spaces is greater than the maximum width allowed.


Transgressed node found during compaction

See General Troubleshooting Tips.


Unable to create temporary work file(s)

A SORT or INDEX command that requires temporary work files was not permitted by the operating system to create them. This is caused by a full directory or a permissions problem concerning access to the temporary files directory.

Check the following:

1.	Increase the FILES= statement in the CONFIG.SYS file.

2.	Check for cross-linked files by running the CHKDSK command at the MS-DOS prompt. (Note: Do not run CHKDSK /F while Windows is running.)


Unable to locate desired version of FoxPro

The version of FoxPro requested is not on the designated path.


Unable to generate printer driver

The printer driver you have specified could not be generated.

Check the following:

1.	Make sure GENPD.APP is in the same directory as the .EXE file.

2.	Make sure there is enough conventional memory.

3.	Create a new printer driver.

4.	Set _GENPD= to the location of GENPD.APP (for example,  _GENPD="C:\FoxPro\GENPD.APP").

5.	Rebuild GENPD.APP.


Unable to project nonCNT values

There was an attempt made to SELECT a variable/field with CNT(*), WHERE the variable/field was false. Reissue the statement, either selecting the CNT(*) or the variable/field.


Unable to process error

No error number is returned. FoxPro is exited after closing all open files.

See General Troubleshooting Tips.


Unknown error code <expN>

An unknown error number was passed to the FoxPro error handler.


Unknown function key

An attempt was made to SET FUNCTION to a function key that does not match the name or number of an existing function key.


Unrecognized command verb

A word that is not a valid FoxPro command was used at the beginning of the command line.


Unrecognized index file revision. Please recreate index

The index file is in a format that is not compatible with this version of FoxPro. Recreate the index.


Unrecognized phrase/keyword in command

A clause used in the command line is either incorrect or is missing. Make sure the proper clauses are present for the command that is being executed. For example:

USE states TAG state (This syntax is incorrect.)

USE states ORDER TAG state (This syntax is correct.)


Unresolvable REGIONAL name conflict

FoxPro has attempted to create a REGIONAL variable name that already exists.


Use of invalid handle

See General Troubleshooting Tips.


Use of unallocated handle

See General Troubleshooting Tips.


Use of transgressed handle

See General Troubleshooting Tips.


Variable must be in selected table

You can only use fields from the currently selected table in quick screens.


Variable ["<variable>"] not found

The specified variable could not be found.


View file invalid

An attempt has been made to open a view file with invalid data.


WINDOW coordinates are invalid

An attempt was made to define a window's coordinates outside the allowable range.


WINDOW has not been activated

An attempt was made to use a window that has not been activated.


WINDOW ["<window name>"] has not been defined

An attempt has been made to activate a window that has not been defined.


Word files must be embedded

An attempt was made to link to a Microsoft Word document using APPEND GENERAL. Microsoft Word version 2.0 does not support linking through the APPEND GENERAL command. Instead, use the Copy command in Microsoft Word, and then choose Paste Special from the Edit menu in FoxPro and choose Paste Link.


Worksheet A for Lotus 1-2-3 version 3.0 file is hidden

FoxPro cannot import a worksheet that has been hidden.


Wrong length key

The key field length does not match for an UPDATE or SET RELATION TO operation between two files.


Wrong number of parameters

The number of parameters specified in a DO ... WITH statement is greater than the number of parameters defined by the PARAMETER statement in the called program.


Error Listings by Number


Errors: 1-99
1-99

1	File ["<file>"] does not exist

3	File is in use

4	End of file encountered

5	Record is out of range

6	Too many files open

7	File already exists

9	Data type mismatch

10	Syntax error

11	Invalid function argument value, type or count

12	Variable ["<variable>"] not found

13	ALIAS ["<alias>"] not found

15	Not a table/DBF file

16	Unrecognized command verb

17	invalid table number

18	Line too long

19	Index file does match table

20	Record is not in index

21	String memory variable area overflow

22	Too many memory variables

23	Index expression is too big

24	ALIAS name already in use

26	Table (database) is not ordered

27	Not a numeric expression

30	Position is off the screen

31	Invalid subscript reference

34	Illegal operation for memo field

36	Unrecognized phrase/keyword in command

37	FILTER requires logical expression

38	Beginning of file encountered

39	Numeric overflow (data was lost)

41	Memo file is missing/invalid

42	CONTINUE without LOCATE

43	Insufficient memory

44	Cyclic relation

45	Not a character expression

46	Illegal value

47	No fields to process

50	Report file invalid

52	No table is in USE

54	Label file invalid

55	Memory variable file is invalid

56	Not enough disk space for "<filename>" (Windows only)

58	LOG() : Zero or negative

61	SQRT domain error

62	Beyond String

67	Expression evaluator fault

78	** or ^ domain error

91	File was not LOADed

94	Wrong number of parameters

95	Statement not allowed in interactive mode

96	Nesting error


Errors: 100's
100's

101	Not Suspended (FoxPro for MS-DOS)

102	Cannot create file "<file>" (2.5 only)

103	DO nesting too deep

104	Unknown function key

107	Operator/operand type mismatch

108	File is in use by another

109	Record is in use by another

110	Exclusive open of file is required

111	Cannot write to a read-only file

112	Invalid key length

114	Index file does not match table file. Recreate Index

115	Invalid DIF file header

116	Invalid DIF vector -- DBF field mismatch

117	Invalid DIF type indicator

119	Invalid SYLK file header

120	Invalid SYLK file dimension bounds

121	Invalid SYLK file format

124	Invalid printer redirection

125	Printer not ready

127	View file invalid

130	Record is not locked

138	No fields were found to copy

152	Missing expression

164	PAD has not been defined

165	POPUP has not been defined

166	No bars have been defined for this popup

167	Bar position must be a positive number

168	Menu has not been defined

169	Menu item cannot be defined

170	Menu item cannot be released

174	Cannot redefine menu in use

175	Cannot redefine popup in use

176	Cannot clear menu in use

177	Cannot clear popup in use

178	MENU has not been activated

179	POPUP has not been activated

181	Menu is already in use

182	POPUP is already in use


Errors: 200's
200's

202	Invalid path or file name

214	WINDOW ["<window name>"] has not been defined

215	WINDOW has not been activated

216	Display mode not available

221	Left margin plus indent must be less than right margin

222	Line number must be less than page length

223	Column number must be between 0 and 255

225	"<name>" is not a memory variable

226	Tab stops must be in ascending order  (2.0 ONLY-- #228 IN 2.5)

226	"<name>" is not a file variable

227	Invalid box dimensions (#277 in 2.0)

228	Tab stops must be in ascending order

230	Bad array dimensions

231	Invalid SET expression

232	"<name>" is not an array

255	Not a valid RapidFile database

256	Not a valid Framework II database/spreadsheet

277	Invalid box dimensions (#227 in 2.5)

279	PROMPTs for this popup have already been defined(FoxPro 2.0)

279	Menu/Popup was not pushed (FoxPro 2.5)

287	POPUP is too small

291	ASIN() : Out of Range

292	LOG10() : Zero or negative

293	ACOS() : Out of Range

297	Invalid Lotus 1-2-3 version 2.0 file format


Errors: 300's
300's

332	WINDOW coordinates are invalid

350	Field must be a memo field

355	Macro not defined

356	Invalid keyboard macro file format

392	Maximum record length exceeded in import file


Errors: 400's-700's
400's-700's

There are no error messages in the 400, 500, and 700 ranges at this time.

691	Library file is invalid (#1691 in 2.5)


Errors: 800's
800's

The following error messages are numbered in the 800's for FoxPro 2.0; for FoxPro 2.5, the numbers are in the 1800's.

800	SQL Internal Error

801	SQL Error Correlating Fields

802	SQL could not locate table

803	SQL invalid HAVING

804	SQL invalid SELECT statement

805	SQL Too many subqueries

806	SQL column "<field>  | <variable>" not found

807	SQL invalid GROUP BY

808	SQL invalid ORDER BY

809	SQL out of memory

810	SQL invalid use of subquery

811	SQL aggregate on non-numeric expression

812	SQL statement too long

813	SQL invalid use of UNION in subquery

814	SQL queries of this type are not supported at present

815	"<cursor>" must be created with SELECT ... INTO TABLE

818	SQL no FROM clause

819	SQL invalid DISTINCT

820	SQL invalid * in SELECT

821	SQL invalid temporary file (2.0 only)

822	SQL invalid aggregate field

823	SQL open file failed (2.0 only)

825	SQL invalid subquery

826	SQL invalid SELECT

828	SQL illegal GROUP BY in subquery

830	SQL index not found

831	SQL err building temporary index

832	"<field> | <variable>" is not unique and must be qualified

833	SQL invalid WHERE clause

834	SQL Too many UNIONs

836	SQL invalid predicate (2.0 only)

839	SQL canceled operation

841	SQL too many columns referenced

842	SQL subqueries nested too deep

844	Nested aggregation not allowed

845	SQL expression too complex

846	Cannot GROUP by aggregate field

848	Unable to project nonCNT values (Windows & 2.0 for MS-DOS)

851	SELECTs are not UNION compatible

860	Subquery returned more than one record


Errors: 900's-1000's
900's-1000's

There are no error messages in the 900 range at this time.

1000	Internal consistency error

1001	Feature Not Available

1002	I/O operation failure

1003	Free handle not found

1004	Use of invalid handle

1005	Use of unallocated handle

1006	Use of transgressed handle

1007	Transgressed node found during compaction

1008	Foreign node found during compaction

1009	Incorrect handle found during compaction

1010	Area size exceeded during compaction

1011	Area cannot contain handle

1012	OS memory error

1098	API Function _UserError() was called


Errors: 1100's
1100's

1101	Cannot open file "<file>"

1102	Cannot create file

1103	Illegal seek offset

1104	File read error

1105	File write error

1108	Relational expression too long (2.0 & 2.5 for MS-DOS)

1108	Picture too big, corrupt, or wrong format (Windows only)

1111	Invalid file descriptor

1112	File close error

1113	File not open

1115	Invalid operation for CURSOR

1115	Database record is trashed (2.0 only)

1117	Wrong length key

1124	Key too big

1126	Record too long

1127	FOR/WHILE need logical expressions

1130	"Field" phrase not found

1134	Variable must be in selected table

1140	FILTER expression too long

1141	Invalid index number

1145	Must be a character, date or numeric field

1147	Target is already engaged in relation

1148	Meaningless use of expression (Windows only)

1148	Too many relationships (MS-DOS only)

1149	No memory for buffer

1150	No memory for file map

1151	No memory for file name

1152	Cannot access selected table

1153	Attempt to move file to different device

1154	Invalid buffpoint call

1155	Invalid buffdirty call

1156	Duplicate field names

1157	Cannot update file

1160	Not enough disk space for "<filename>"

1161	Too many records to BROWSE/EDIT in demo version

1162	Procedure "<procedure>" not found

1163	Browse table closed

1164	Browse structure changed

1165	"<field>" is not related to the current area

1178	Application file "<file>" not closed

1190	Invalid .LIB signature

1191	Bad .LIB file

1192	Internal .LIB undefined symbol error

1193	Missing .RTT section

1194	Link command failed

1195	Object file "<file>" is the wrong version

1196	"<file>" is not a FoxPro EXE file


Errors: 1200's
1200's

1201	Too many names used

1202	Program too large

1206	Recursive macro definition

1211	IF/ELSE/ENDIF mismatch

1212	Structure nesting too deep

1213	Mismatched case structure

1214	ENDTEXT without TEXT

1217	Picture error in GET statement

1220	Invalid character in command

1221	Required clause not present in command

1223	Invalid variable reference

1225	Must be a memory variable

1226	Must be a file variable

1229	Too few arguments

1230	Too many arguments

1231	Missing operand

1232	Must be an array definition

1234	Subscript out of bounds

1235	Structure invalid

1238	No PARAMETER statement found

1241	Improper data type in group expression

1242	Syntax error in field expression (Windows only)

1243	Internal error: Too many characters in report

1245	Error in label field definition

1246	Total label width exceeds maximum allowable size

1249	Too many READs in effect

1250	Too many PROCEDURES

1252	Compiled code for this line too long

1253	Cannot rename current directory

1254	Nested key labels are invalid

1255	Key label ["<label>"] is invalid

1256	Mismatched braces in key label

1257	Key string too long

1282	Insufficient memory

1294	FOXUSER file is invalid

1296	Error reading resource (Windows only)


Errors: 1300's
1300's

1300	Missing )

1304	Missing (

1306	Missing ,

1307	Division by 0

1308	Insufficient stack space

1308	Stack overflow -- expression too complex (2.0 only)

1309	"<file>" is not an object file

1310	Too many PICTURE characters specified

1337	PRINTJOBs cannot be nested

1338	File is the wrong version (Windows only)


Errors: 1400's
1400's

1405	RUN/! command failed

1410	Unable to create temporary work file(s)

1411	RUN/! command string too long

1412	Cannot locate COMSPEC environment variable

1420	Invalid or corrupted OLE object

1425	Word file must be embedded

1462	<file> internal consistency error


Errors: 1500's
1500's

1502	Record is in use: Cannot write

1503	File cannot be locked (Windows only)

1507	Screen code too large for memory


Errors: 1600's
1600's

1600	Not enough memory to USE table

1604	No menu bar defined

1605	No popup menu defined

1607	Maximum allowable menu items (128) exceeded

1608	Maximum allowable menus (25) exceeded

1611	Menu items/titles must be type CHARACTER

1612	No such menu/item is defined

1621	No pads defined for this menu

1632	Invalid WINDOW file format

1637	File must be opened exclusively to convert memo file

1642	COLORSET resource not found

1643	Printer driver is corrupted

1644	Printer driver not found

1645	Report nesting error

1646	Total field type must be numeric

1647	Improper data type in field expression

1649	No previous PRINTJOB to match this command

1651	CANCEL/SUSPEND is not allowed

1652	Attempt to use FoxPro function as an array

1653	Label nesting error

1657	Column number must be between 0 and right margin

1659	Cannot convert memo file for a read-only table file

1661	Invalid Excel version 2.0 file format

1662	Invalid Lotus 1-2-3 version 1.0 file format

1670	Invalid Multiplan version 4.0 file format

1671	Cannot import from password-protected file

1672	Cannot append from password-protected file

1673	Invalid Symphony version 1.0 file format

1674	Invalid Symphony version 1.1 file format

1678	Invalid Lotus 1-2-3 version 3.0 file format

1679	Import only Worksheet A for Lotus 1-2-3 version 3.0 files

1680	Worksheet A for Lotus 1-2-3 version 3.0 file is hidden

1681	PREVIEW clause not allowed with OFF/NOCONSOLE or TO PRINT/FILE

1682	Not a user-defined window

1683	Index tag not found

1684	Index tag or file name must be specified

1685	Project file is invalid

1686	Screen file invalid

1687	Menu file invalid

1688	Invalid Paradox version 3.5 file format

1689	Cannot build APP/EXE without a main program

1690	Table/DBF operation invalid while indexing

1691	Library file is invalid (# 691 in 2.0)

1692	Unresolvable REGIONAL name conflict

1693	Cannot find screen/menu generation program

1694	Too many extensions specified

1695	COLUMN/FORM/ALIAS/NOOVERWRITE/WIDTH allowed only with FROM clause

1696	NOWAIT/SAVE/NOENVIRONMENT/IN/WINDOW clauses not allowed with FROM

1698	COLUMN/ROW/ALIAS/NOOVERWRITE/SIZE/SCREEN allowed only with FROM clause


Errors: 1700's
1700's

1705	File access denied

1706	DESCENDING not permitted on IDX files

1707	Structural CDX file not found

1708	File is open in another work area

1709	Cannot load PROAPI16.EXE (2.5 for MS-DOS only)

1710	MULTISELECT/MOVER not supported for prompt style popup

1711	API library revision mismatch. Rebuild Library

1712	Invalid or duplicate field

1713	Invalid field width or number of decimal places

1715	Server "<server>" not found

1716	Queue "<queue>" not found

1717	Unable to generate printer driver (MS-DOS only)

1718	File is read-only

1719	Cannot build APP/EXE while suspended

1720	Cannot SET FORMAT while in a READ with a FORMAT file

1721	All work areas in use

1722	Invalid preprocessor expression (Windows only)

1723	Mismatched #IF/#ELSIF/#ELSE/#ENDIF (Windows only)

1724	Missing #ENDIF (Windows only)

1725	Constant is already #defined (Windows only)

1726	API library not found (Windows only)


Errors: 1800's
1800's

1800	SQL Internal Error

1801	SQL Error Correlating Fields

1802	SQL could not locate table

1803	SQL invalid HAVING

1804	SQL invalid SELECT statement

1805	SQL Too many subqueries

1806	SQL column "<field>  | <variable>" not found

1807	SQL invalid GROUP BY

1808	SQL invalid ORDER BY

1809	SQL out of memory

1810	SQL invalid use of subquery

1811	SQL aggregate on non-numeric expression

1812	SQL statement too long

1813	SQL invalid use of UNION in subquery

1814	SQL queries of this type are not supported at present

1815	"<cursor>" must be created with SELECT ... INTO TABLE

1818	SQL no FROM clause

1819	SQL invalid DISTINCT

1820	SQL invalid * in SELECT

1822	SQL invalid aggregate field

1825	SQL invalid subquery

1826	SQL invalid SELECT

1828	SQL illegal GROUP BY in subquery

1830	SQL index not found

1831	SQL err building temporary index

1832	"<field> | <variable>" is not unique and must be qualified

1833	SQL invalid WHERE clause

1834	SQL Too many UNIONs

1839	SQL canceled operation

1841	SQL too many columns referenced

1842	SQL subqueries nested too deep

1844	Nested aggregation not allowed

1845	SQL expression too complex

1846	Cannot GROUP by aggregate field

1848	Unable to project nonCNT values (Windows & 2.0 for MS-DOS)

1851	SELECTs are not UNION compatible

1860	Subquery returned more than one record


Errors: 1900's
1900's

1903	String too long to fit

1907	Bad drive specifier

1908	Bad width or decimal place argument

1910	Illegal printer driver recursion

1912	Illegal operation for general field (Windows only)

1913	Field must be a general field (Windows only)

1999	Function not yet implemented


Distribution Kit Error Messages

Can not execute WLINK8.EXE

Can not load PROAPI16.EXE

Link command failed

Feature not available

File access denied

File is in use

Option grayed for executable building

Packaging Methods

Run/! command failed

Source is out of date


Can not execute WLINK8.EXE

WLINK8.EXE is used to create an .EXE file. Therefore, this error occurs when you are building an .EXE file.

This problem can be caused by one of the following situations:

WLINK8.EXE is not in the FoxPro directory, or the directory is not in the MS-DOS search path. (If you are using Novell, FoxPro should be in the network path.)

There is not enough conventional memory.


Option grayed for executable building

You will notice this problem when an attempt to build an executable is made.

Check the following:

1.	Make sure you have the Distribution Kit installed in the FoxPro 2.5 directory.

2.	Make sure FoxPro files are NOT be marked as read-only when the Distribution Kit is installed because it makes changes to the FoxPro .EXE files.

3.	If an application is running, choose Cancel from the Program menu.

4.	Make sure there is a main set in the project.


Packaging Methods

There are several different packaging methods; the pros and cons of each method are listed below.

Build an .APP File and Let the Client Purchase the Development Package

Pros

Allows the developer access to the development package and source code for on-site debugging and updating.

Smaller investment for the developer.

Client access to full development environment and the power tools.

Cons

Gives the customer access to program source and the ability to break the code.

Version change problems -- which changes were made on this site?

Initial distribution and setup time at the client site may be necessary.

Larger initial investment for the client by purchasing the development version.

Source code can be copied by the client.

Build an .APP File and Use the FoxPro Support Libraries

Pros

Files are self-contained and will generally run faster.

Easier to maintain version control.

Installation process more simplified.

One-time investment for the developer.

Client does not need to pay extra for a development kit.

Source code is protected from copying.

Access to power tools.

Cons

Support library files are quite large.

Distribution may be hampered by large files that will not fit on low-density floppy disks.

Multiple files for distribution.

Cannot be executed from the MS-DOS prompt; a loader executable (FOXR.EXE) is needed.

Build a Compact .EXE File

Pros

Can be executed from MS-DOS.

Can determine in which environment FoxPro is running.

Access to power tools.

Cons

Multiple files for distribution.

Support libraries are quite large.

Build a Stand-Alone Application File

Pros

One easy-to-distribute file.

Optimized application, containing only the FoxPro support libraries that are needed.

Can be executed from MS-DOS.

Cons

Application must be split over multiple floppy disks for distribution.

May encounter missing support libraries (macro substitution).

Certain menu items and the ability to modify documents with the power tools disappear. Client must rely on developer for minor changes to reports, such as address changes and appearance.


FoxDoc Error Messages

Error 202 on FoxDoc Tree

FoxDoc cross-reference keywords

FoxDoc incorrectly reports table

FOXDOC.MSG file cannot be found

FoxDoc requires Read/Write access (read-only error)

Incorrect listing of FOXDOC.FLL

Out of memory using FoxDoc

Printer Setup file could not be found

Range check error

Too many procedures

FoxDoc Generator Directives for Program Files

FoxDoc System Capacities

FoxDoc Template Locations


 Error 202 on FoxDoc tree

Error 202 can occur in the June 9 version of FoxDoc when you are running the tree diagram on a complex application.

This error is caused by a stack overflow due to the complexity of the application that TREE is attempting to document. It is a Turbo Pascal error.

At this time, we do not have a workaround for this error.

Note: The current version of FoxDoc is 2.1e.


 FoxDoc cross-reference keywords

Microsoft has confirmed this to be a problem in FoxPro 2.5 for Windows. This problem was corrected in FoxPro 2.5a for Windows.


 FoxDoc generator directives for program files

FoxDoc can be used to search multiple directories for program files. To do this, use generator directives.

The FoxDoc system screen contains an entry field labeled "Path for program source code." One MS-DOS path can be entered in this field. To force FoxDoc to search additional directories, the generator directive

*#FOXDOC PRGPATH <path name>

must be included in the program source code. The source code will view these directives as comments, but FoxDoc will execute the command.

Multiple directories require a separate generator directive for each directory. For example, if program files are located in the directories C:\APPLIC\PRGS and C:\APPLIC\PROC, the following code is needed:

*#FOXDOC PRGPATH C:\APPLIC\PRGS

*#FOXDOC PRGPATH C:\APPLIC\PROC


 FoxDoc incorrectly reports table names

When FoxDoc is run on a project that contains a query that builds a quick report, the FoxDoc-generated DATADICT.DOC is inaccurate. FoxDoc incorrectly parses the .QPR file, interpreting each keyword in the REPORT FORM command as a table.

Do not use the Query Builder Quick Report option. Manually design a quick report using the Report Writer. Create a .PRG file that includes a call to the .QPR file and a call to the REPORT FORM command.


 FOXDOC.MSG file cannot be found

Microsoft FoxDoc is a code-documentation utility distributed with Microsoft FoxPro for MS-DOS. The most recent version of FoxDoc, version 2.1e, corrects the following two problems in earlier versions of FoxDoc:

1.	If you attempt to run FoxDoc from a network directory other than the directory in which FoxDoc is installed, a "FOXDOC.MSG file cannot be found" error occurs.

2.	If the path to a file is specified using a macro substitution, FoxDoc appends a period to the generated filename and displays a "Program file not found" error message.

Version 2.1e of FoxDoc is available through an Application Note titled "Updated Microsoft FoxDoc Files" (FP0660).

You can obtain this Application Note from the following sources:

CompuServe, GEnie, and Microsoft OnLine

Microsoft Download Service (MSDL)

The Internet (Microsoft anonymous FTP server)

Microsoft FastTips Technical Library

Microsoft Product Support Services

To Obtain This Application Note

On CompuServe, GEnie, and Microsoft OnLine, Application Notes are located in the Microsoft Software Library. You can find FP0660 in the Software Library by searching on the word FP0660, the Q number of this article, or S14118. FP0660 was archived using the PKware file-compression utility.

Application Notes are available by modem from the Microsoft Download Service (MSDL), which you can reach by calling (206) 936-6735. This service is available 24 hours a day, 7 days a week. The highest download speed available is 14,400 bits per second (bps). For more information about using the MSDL, call (800) 936-4100 and follow the prompts. To obtain FP0660, download FP0660.EXE. FP0660.EXE is a compressed, self-extracting file. After you download FP0660, run it to extract the file(s) it contains.

On the Internet, Application Notes are located on the Microsoft anonymous ftp server, which you can reach by typing "ftp ftp.microsoft.com" (without the quotation marks) at the ">" command prompt.

You can have this Application Note mailed or faxed to you from the automated Microsoft FastTips Technical Library, which you can call 24 hours a day, 7 days a week at (800) 936-4100. NOTE: The FastTips Technical Library is available only to customers within the U.S. and Canada.

If you are unable to access the source(s) listed above, you can have this Application Note mailed or faxed to you by calling Microsoft Product Support Services Monday through Friday, 6:00 A.M. to 6:00 P.M. Pacific time at (206) 635-7191. If you are outside the United States, contact the Microsoft subsidiary for your area. To locate your subsidiary, call Microsoft International Customer Service at (206) 936-8661.


FoxDoc requires Read/Write access (read-only error)

When you attempt to use FoxDoc under FoxPro for Windows, the following error message appears and you are returned to FoxPro for Windows:

Invalid path or filename

This message appears when FoxPro for Windows is being run from a directory that the user has read-only rights to.

Read/write access rights to the directory where the FOXPROW.EXE file is located must be given to those who need to run FoxDoc because FoxDoc writes temporary files and an initial configuration file to the directory in which FoxPro is located.

Note: On a LAN Manager network, if the user is given Create rights to the FoxPro read-only directory, this problem is resolved. This resolution may also work on other networks.


 FoxDoc template locations

The FoxDoc application uses default templates to generate printed documentation about FoxPro programs, applications, or entire projects.

The Application Note "FoxDoc Default Template Files" (FW0844) contains an updated version of FoxDoc that allows you to use different templates. This disk also contains the original template files, which you can modify and then use in FoxDoc to customize your printed documentation.

You can obtain this Application Note from the following sources:

CompuServe, GEnie, and Microsoft OnLine

Microsoft Download Service (MSDL)

The Internet (Microsoft anonymous FTP server)

Microsoft FastTips Technical Library

Microsoft Product Support Services

To Obtain This Application Note

On CompuServe, GEnie, and Microsoft OnLine, Application Notes are located in the Microsoft Software Library. You can find FW0844 in the Software Library by searching on the word FW0844, the Q number of this article, or S14199. FW0844 was archived using the PKware file-compression utility.

Application Notes are available by modem from the Microsoft Download Service (MSDL), which you can reach by calling (206) 936-6735. This service is available 24 hours a day, 7 days a week. The highest download speed available is 14,400 bits per second (bps). For more information about using the MSDL, call (800) 936-4100 and follow the prompts. To obtain FW0844, download FW0844.EXE. FW0844.EXE is a compressed, self-extracting file. After you download FW0844, run it to extract the file(s) it contains.

On the Internet, Application Notes are located on the Microsoft anonymous ftp server, which you can reach by typing "ftp ftp.microsoft.com" (without the quotation marks) at the ">" command prompt.

You can have this Application Note mailed or faxed to you from the automated Microsoft FastTips Technical Library, which you can call 24 hours a day, 7 days a week at (800) 936-4100. NOTE: The FastTips Technical Library is available only to customers within the U.S. and Canada.

If you are unable to access the source(s) listed above, you can have this Application Note mailed or faxed to you by calling Microsoft Product Support Services Monday through Friday, 6:00 A.M. to 6:00 P.M. Pacific time at (206) 635-7191. If you are outside the United States, contact the Microsoft subsidiary for your area. To locate your subsidiary, call Microsoft International Customer Service at (206) 936-8661.


 Incorrect listing of FOXDOC.FLL

Page 3-10 of the FoxPro for Windows "Installation and Configuration" guide incorrectly lists FOXDOC.DLL as one of the files that FoxPro looks for upon startup. The correct filename is FOXDOC.FLL.

Note: FoxPro for Windows does not use dynamic-link libraries (DLLs); instead it uses Fox link libraries (FLLs).


 Out of Memory

An "Out of memory" error occurs while running FoxDoc. Conventional memory (addressed below 640K) is full (FoxDoc uses only conventional memory).

Things to try:

Modify the CONFIG.SYS and AUTOEXEC.BAT files to free conventional memory. Take out terminate-and-stay-resident programs (TSRs), load high, and so on.

Reduce the number of cross-references to free additional memory.

To do this in FoxPro for MS-DOS, choose the Reports pad from the FoxDoc Main menu. Set the Write Variable Cross-Reference? option to N for No (by default, this option is set to Y for Yes).

To do this in FoxPro for Windows, choose the Reports button under Other Options in the FoxDoc dialog box, and then clear the Cross Reference check box.

Run FoxDoc as a separate .EXE file, instead of inside FoxPro.


 Printer Setup file could not be found

While you are using FoxDoc, the error message "The printer setup file could not be found" may be generated when you press F2 while in the Printing Options Screen.

There are two possible reasons for this message:

FoxDoc cannot find the FoxDoc print options file because it doesn't exist or is corrupted. The FoxDoc print options file is named FXDPRT.FXD. It should be located in the FoxPro program directory.

The path entered on the System screen for the location of the FoxDoc files is not correct.

To correct this problem, do the following:

1.	If the FXDPRT.FXD file is missing or suspected to be corrupt, reinstall the FoxDoc files from the installation disks.

2.	Make sure the path for FoxDoc files on the FoxDoc System Screen is pointing to the directory where FoxDoc is installed. This will normally be the same directory where FoxPro is installed. A common reason that the path for FoxDoc files is not set to the FoxPro directory is because a default directory was set in FoxPro and was not changed on the FoxDoc System Screen.


 Range Check error

If you run the MS-DOS-based version of FoxDoc on screens that contain Windows records (for example, screens that have been modified in FoxPro for Windows), you may occasionally receive a "Range Check Error" when FoxDoc outputs the screen summary.

To avoid this problem, turn off the screen summary report or document these screens or projects using the Windows-based version of FoxDoc.

Note: Microsoft has confirmed this to be a problem in FoxPro 2.5 for MS-DOS. This problem was corrected in FoxPro 2.5a for MS-DOS.


 FoxDoc System Capacities

The limits for FoxDoc can be found by bringing up FoxDoc under FoxPro for MS-DOS and pressing F1 three times when the initial screen appears. The limits will then be listed. This feature is not available when FoxDoc is running under FoxPro for Windows. However, the limits listed are also the same for FoxDoc running under FoxPro for Windows.

The limits of FoxDoc running under FoxPro for MS-DOS and FoxPro for Windows are as follows:

Maximum program files:	1024

Maximum of each other file type:	255

Maximum tokens:	Unlimited

Maximum length of a token:	20

Maximum number of keywords:	1600

Maximum length of keyword:	15

Maximum levels of program nesting:	20

Maximum number of database fields:	1500

Maximum length of filename:	79

Maximum number of macro definitions:	100

Maximum program/data directories:	25


 Too many procedures

The error message "Too Many Procedures" occurs while you are documenting a tree diagram in FoxDoc.

The maximum number of program items (program files, procedure files, individual procedures, and functions) is 1024. This FoxDoc limitation was inadvertently omitted from the manuals.

To avoid this error, reduce the number of program items before documenting a tree diagram in FoxDoc.

See also System Capacities.


 Clean Boot

What Is a Clean Boot?

A "clean boot" (starting your computer after all unnecessary commands have been removed from your CONFIG.SYS and AUTOEXEC.BAT files) is used as a basic troubleshooting step to test possible conflicts between FoxPro and various terminate-and-stay-resident (TSR) programs and device drivers.

IMPORTANT -- Before You Clean Boot

Create a bootable floppy disk that contains the MS-DOS system files and any other files that are required to make the system operational, such as disk-compression utilities (for example, Stacker), disk-partitioning drivers (for example, Disk Manager), and other third-party device drivers.

If there is disk partitioning, disk compression, or other third-party software required to boot the computer, the startup files on the disk created above should appear as follows:

"Clean Boot" CONFIG.SYS and AUTOEXEC.BAT Files

CONFIG.SYS	AUTOEXEC.BAT

FILES=50	PROMPT $P$G

BUFFERS=20

<Third-party disk partitioner>

<Third-party disk compression driver>

<Other third-party driver>

Exceptions

The following are examples of drivers that SHOULD NOT be removed; they are used when the computer is turned on to make the hard disk drive accessible. This is not a complete list, but it does include most of the commonly used drivers.

Hard Disk Drivers

AH1544.SYS	SCSIHA.SYS
ASPI4DOS.SYS	SKYDRVI.SYS
ATDOSXL.SYS	SQY55.SYS
ILIM386.SYS	SSTBIO.SYS
NONSTD.SYS	SSTDRIVE.SYS
SCSIDSK.EXE
Disk Partitioners

DMDRVR.BIN	HARDRIVE.SYS
EDVR.SYS	LDRIVE.SYS
ENHDISK.SYS	SSTOR.SYS
FIXT_DRV.SYS
Disk-Compression Utilities

DEVSWAP.COM	SSWAP.COM
SSTOR.EXE	STACKER.COM

If you don't know the purpose of a device driver or program, DO NOT remove it. Most device drivers and programs will display a message describing their purpose when they are initialized.

A Clean Boot DOES NOT Include

- DOS=HIGH,UMB	- Third-party disk caches
- EMM386.EXE	- Various third-party TSRs
- INSTALL=SHARE.EXE	- LOGIMENU, CLICK
- INSTALL=FASTOPEN.EXE	- Virus checkers
- Third-party memory managers	- Drivers for scanners/fax
- RAM disk devices	- Drivers for CD ROM/network
- JOIN, GRAPHICS, PRINT, SUBST, APPEND	- Tape backup spoolers/redirectors/buffers
- MODE for printer redirection	- Data-acquisition units
- Multiple PATH statements	- Keyboard accelerators/buffers
- MS-DOS-level mouse drivers