Most FileFlex calls return result codes that are either negative or positive. You should check the result code after every call to FileFlex. Generally, positive result codes (zero and up) mean that the function executed successfully. Negative result codes generally mean that something didn't go right with the function call.
One of the most common technical support call is "Gee, my database isn't working". When we ask the caller if he or she checked the result codes after, say, DBUse, we're often told "No, why?"
We then go into a long, reasoned discourse that, summarized, goes like this: "If you don't check an earlier result, the later operation isn't guaranteed to work. So, if your DBUse fails (and it often does when you don't specify the file path properly), lots of stuff later in your code will fail. The moral of the story: check result codes."
Positive Result Codes
Positive result codes indicate the function executed successfully. Remember, a function might execute successfully, but not be what you want (like if you do a search, but nothing is found). The function worked, just nothing was there.
Successful result | ... | 0 |
Operation moved record pointer past BOF | ... | 1 |
Positioned after nearest match | ... | 2 |
Operation moved record pointer past EOF | ... | 3 |
No match was found | ... | 4 |
Basic Error Codes
FileFlex has a few, simple result codes that return a status if a basic system error occurred:
General program error (overflow) | ... | -1 |
No such field | ... | -4 |
No such record | ... | -5 |
Field not numeric | ... | -6 |
Insufficient or wrong type parameter | ... | -7 |
Index file out of date | ... | -8 |
General Disk Access Errors
FileFlex may encounter an error when accessing the disk system. These errors are:
File creation error | ... | -100 |
File open error | ... | -120 |
Too many files open | ... | -122 |
Attempt to open same file | ... | -126 |
File read error | ... | -140 |
Error getting file size | ... | -142 |
Low-level data access error | ... | -144 |
File write error | ... | -160 |
Error deleting file | ... | -162 |
Error renaming file | ... | -164 |
Error adjusting file size | ... | -166 |
File close error | ... | -180 |
Database Specific Errors
FileFlex may encounter an error when working with databases. These errors are:
Bad database file | ... | -200 |
No such field type | ... | -220 |
Database file not found | ... | -240 |
Record length too large | ... | -260 |
Record length inconsistent | ... | -280 |
Index File Specific Errors
FileFlex may encounter an error when working with index files. These errors are:
Index error | ... | -300 |
Error closing index file | ... | -310 |
File is not an index file | ... | -320 |
Index file missing a key | ... | -330 |
Index file record error | ... | -335 |
Key is not unique | ... | -340 |
Can't find tag name | ... | -345 |
Key equates to a logical value | ... | -350 |
Key length or type has changed or is invalid | ... | -360 |
Key length exceeds 100 characters | ... | -370 |
Seek attempted with no open index file | ... | -380 |
Multi-user errors
FileFlex may encounter an error in the multi-user environment. These errors are:
File locking error | ... | -400 |
Invalid file access mode | ... | -410 |
OS won't permit file open | ... | -420 |
Access denied | ... | -430 |
File unlocking error | ... | -450 |
Expression Evaluation Errors
FileFlex may encounter an error when working with expressions. These errors are:
Database not found during expression evaluation | ... | -500 |
Attempt to evaluate null expression | ... | -510 |
Illegal date in expression | ... | -515 |
Expecting ',' or ')' in expression | ... | -520 |
Incomplete expression | ... | -530 |
Math overflow in expression | ... | -540 |
Operator or parameter type mismatch | ... | -550 |
Right bracket missing in expression | ... | -560 |
Unrecognized function | ... | -570 |
Unrecognized operator | ... | -575 |
Unrecognized value | ... | -580 |
Unterminated string in expression | ... | -590 |
IIF() must eval same length parameters | ... | -591 |
SUBSTR() or STR() must evaluate constants | ... | -592 |
Wrong type for sub-expression | ... | -593 |
Invalid expression for tag | ... | -594 |
Memo Errors
FileFlex may encounter an error when working with memo fields and files. These errors are:
Can't create memo file | ... | -600 |
Not a memo field | ... | -610 |
Not enough memory to convert CRLF | ... | -620 |
Memo file structure bad | ... | -630 |
Relation and Acceleration Errors
FileFlex may encounter an error when working with relations. These errors are:
Error creating or accessing relation | ... | -800 |
Can't find relation | ... | -810 |
Can't find child | ... | -820 |
Accelerated query error | ... | -830 |
Relational query can't be accelerated | ... | -840 |
Can't clear accelerated query | ... | -850 |
Can't flush accelerated query | ... | -860 |
No more relations | ... | -870 |
Other FileFlex Errors
FileFlex may encounter other errors. These errors are:
Out of memory | ... | -900 |
Parameter overflow or underflow | ... | -905 |
Attempt to go beyond max allowed records | ... | -910 |
Internal data structure error | ... | -915 |
Extra information not expected | ... | -920 |
Can't find internal name | ... | -925 |
Result not consistent | ... | -930 |
Unsupported function or operation | ... | -935 |
Internal version not consistent | ... | -940 |
Internal data structure not found | ... | -945 |
Internal error | ... | -950 |
Internal data trace error | ... | -955 |
Internal data dictionary corrupt | ... | -956 |
No encryption key provided | ... | -960 |
No encryption string provided | ... | -961 |
Path specification required | ... | -962 |
Encryption option not valid | ... | -963 |
Beta expired | ... | -970 |
Invalid platform for engine version | ... | -971 |
Column lengths don't match | ... | -980 |