PRODUCT : Paradox Engine NUMBER : 1295 VERSION : 3.0 OS : DOS DATE : October 26, 1993 PAGE : 1/7 TITLE : Common causes of Paradox Engine error messages. Common causes of Paradox Engine error messages ============================================== This file lists some of the more common error messages and their causes. The file ti-1325, available in the same locations as this file, contains general suggestions on programming the Paradox Engine and avoiding these errors. Preventive measures are always preferable to curative ones. Observing the suggestions will help to correctly identify the location and source of a problem. "Error# 4: File is locked" - One possible way around this error is to create a retry loop which performs the desired operation 10 times. The engine will do a validity check of the lock after approximately four iterations, which may clear up the contention. "Error# 8: Primary index is out of date" - This error messages can occur if the sort order of the Engine app is different from the sort order of the table. A common cause of this is using the International sort order with Paradox while using the Engine with its default ASCII sort order. The sort order can be changed by using the PXSetDefaults function. "Error# 15: Multiple Paradox net files found" One paradox.net ( or pdoxusrs.net ) file controls access to any given table. This error occurs when two application using different net files try to access the same table. A common cause of this error is using different drive mappings on different machines. The Paradox Engine uses the directory path ( minus the drive letter ) to determine the location of the PDOXUSERS.NET file. Configure all workstations to reference the network control directory using the same path. This error is also caused by using the same directory for controlling version 3.5 and version 4.0 locking mechanism. This would result in both a paradox.net and pdoxusrs.net file existing within the same directory. Delete the .net PRODUCT : Paradox Engine NUMBER : 1295 VERSION : 3.0 OS : DOS DATE : October 26, 1993 PAGE : 2/7 TITLE : Common causes of Paradox Engine error messages. files and change the net directory of one of the application. This error will also occur if there are old lock files ( .lck ) from a previous application lying about ( through a crash, for example ) which reference a different Paradox net file. Delete the .lck files. WINDOWS: The location of the net file is set in win.ini. There is a Windows utility provided, pxengcfg.exe, which will modify the setting in the win.ini file. Use this to utility to change the net directory. Also make certain that all workstations are using the same DLL. Having the Engine 2.0 DLL on the path before the Engine 3.0 DLL will link in the wrong version of the Engine. This will cause network concurrency issues among other things. "Error# 21: Insufficient password rights" - Trying to access a 4.0 table from Paradox 3.5 or PXEng 2.0. Can also happen when trying to run Paradox 4.0/PXEng 3.0 on the network from a directory controlled by PX 3.5 ( contains a paradox.net file ). WINDOWS: This error can be caused by using the wrong DLL. Check the path for old versions of the Paradox Engine DLL ( from the root directory, 'dir px*.dll /s' ). "Error 33: Invalid Parameter" - From PXTblEmpty(): The PXTblEmpty function from v3.0 of the engine can incorrectly return this message. Workaround: create a new table with the same structure as the old, delete the original table ( PXTblDelete() ), and copy the new table back to the old. From PXSrchFld(): PRODUCT : Paradox Engine NUMBER : 1295 VERSION : 3.0 OS : DOS DATE : October 26, 1993 PAGE : 3/7 TITLE : Common causes of Paradox Engine error messages. This error can occur when the table has been opened on a secondary Index and an attempt is made to search on a field which is not part of the index. "Error# 40: Not enough memory to complete operation" - Use PXSetDefaults() for a DOS application, or pxengcfg.exe for a windows application, to increase the amount of swap buffer space available to the engine application. The documentation for PXSetDefaults() gives more information about the swap buffer. If in the IDE, make certain that Options | Debugger | Program Heap Size is set to 640K. From PXTblOpen - Besides the above, this message can also mean that the table being used has become corrupted. Try running TUtility.exe on the table to test for corruption. "Error# 50: Another user deleted record" - This message can occur when a table has been opened more than once ( from one application or multiple applications) and a record deleted in one opening of the table is the current record for the other opening of the table. This is standard engine behavior, so some method will need to be used to reposition the record cursor ( pointer that the engine uses for the current record ). Please see ti-1003 for more information regarding this error. "Error# 53: Invalid offset into BLOb" - This error can occur when the offset into a BLOb is larger than the size of the BLOb. A common situation which causes this error is calling the PXBlobPut() function when the offset plus the size of the buffer are larger than the size of the BLOb specified in the PXBlobOpenWrite() statement. "Error# 89: Record not found" - This message indicated that an exact match was not found. This is expected behavior when doing a CLOSESTRECORD search when an exact match is not found. There is a known problem with PXSrchFld() returning this message when it actually found the record. There is a maintenance release to the PRODUCT : Paradox Engine NUMBER : 1295 VERSION : 3.0 OS : DOS DATE : October 26, 1993 PAGE : 4/7 TITLE : Common causes of Paradox Engine error messages. Paradox Engine 3.0 available on our local BBS at ( 408 ) 439-9096 in the 'patch' section, and on CompuServe in the BDEVTOOLS forum, lib 11. The file pxall.zip contains the libraries for the maintenance release. Disks are also available from our Customer Service department. "Error# 96: Secondary index is out of date" - Besides having an out of date index, this message can occur if the sort order of the Engine app is different from the sort order of the table. A common cause of this is using the Intl sort order with Paradox and using the Engine with its default ASCII sort order. The sort order can be changed by using the PXSetDefaults function. "Error# 98: Could not login on network" - This error comes up when the application does not have read, write, and create access to the network directory specified in either PXNetInit for DOS applications, or in win.ini for windows applications ). Can also be caused by using the LOCALSHARE parameter to PXNetInit() when share.exe is not loaded. DOS: make certain that the path uses double backslashes as opposed to single backslashes. Strings in C and C++ treat a single backslash as the escape character. For example, "\n" is a carriage return, line feed. Use "f:\\pdx\\netdir\\" to specify f:\pdx\netdir\. WINDOWS: Run the pxengcfg.exe utility to specify the net path. "Error# 101: End of table" - This error can be generated when the table is opened on the primary index, but a PXSrchFld() is being done on a field which is part of a single field secondary index. The table will be sorted according to the secondary index, but the end of table will be determined by the primary index. Open the table on the secondary index and do the search. "Error# 107: Engine not initialized with PXNetInit" - PRODUCT : Paradox Engine NUMBER : 1295 VERSION : 3.0 OS : DOS DATE : October 26, 1993 PAGE : 5/7 TITLE : Common causes of Paradox Engine error messages. The Paradox Engine has not been initialized in a shareable mode. This can occur when the PXNetInit function with the NOTONNET parameter was used to initialize the engine. The NOTONNET parameter, as well as the NOSHARE parameter, do not allow the creation of any locks on your system. "Error# 118: Table is busy" - This error happens when the application tries to lock a table when the corresponding prevent lock already exists, or when the application tries to set a prevent lock and a conflicting lock already exists. Check for old, unused lock files. Delete any .lck files that may exist after all engine apps have terminated. Also run the TUtility program to test for table validity. See pg. 31 of the Paradox Engine users guide for more information on locks. "Error# 120: Table is not found" - Besides not being able to find the table, this error can also occur when the sort order that the engine uses is different from the sort order of the table. A common cause of this is using the Intl sort order with Paradox and using the Engine with its default ASCII sort order. The sort order can be changed by using the PXSetDefaults function. "Error# 126: General Hardware Error" - This error can occur from any network error which the Paradox Engine does not specifically handle. This error can also be generated when accessing a corrupted table. Run tutility.exe on the table to test for table corruption. "Error# 134: Can't share Paradox net file -- is SHARE.EXE loaded?" - Besides not having share loaded, this message can come up if share is loaded but the application does not have access to the directory where paradox.net is located. This error also occurs if the net file has gotten corrupted. Delete the net file to resolve this problem. PRODUCT : Paradox Engine NUMBER : 1295 VERSION : 3.0 OS : DOS DATE : October 26, 1993 PAGE : 6/7 TITLE : Common causes of Paradox Engine error messages. "Error# nnn: Internal Error #nnn " - The most likely cause of this message is some sort of memory corruption,. Make certain that the code is compiled with all warnings turned on and test stack overflow turned on. Then try doubling the size of the stack because test stack overflow does not work in Windows or with any of our functions ). Memory corruption also occurs when a previous engine function failed but was not detected. Make certain that the return code for all engine functions is being checked. Get TI-738 on memory corruption and TI-1001 on Internal Errors. Also run TUtility on the table to test for table corruption. There were also certain cases where internal errors would be erroneously generated by v3.0 of the engine which were resolved in the maintenance release. The libraries, and the libraries only, to the Paradox Engine 3.01 maintenance release are available on our local BBS at ( 408 ) 439-9096 in the "patch" section. Disks are also available from our Customer Service department. "Error# 400: Invalid Engine Type ( Database Framework )" - The database library for the Paradox Engine 3.0 is built with "treat enums as ints". This means that the BEngine constructor is expecting a full two byte value coming in on the stack. If the project is built without this switch on, the compiler will assume the size of the BEngineType is a byte, and it will pass an argument which the libraries constructor will not read properly. Effectively, the compiler will do this: mov al, 1 ; if we used pxLocal push ax which leaves garbage in the high order byte. This would be OK if the library was expecting a byte on the stack, but because it uses a whole word, it will read the garbage from the high order byte. Re-compile your application with the "Treat enums as ints" switch. "Error 404: Table not open" - PRODUCT : Paradox Engine NUMBER : 1295 VERSION : 3.0 OS : DOS DATE : October 26, 1993 PAGE : 7/7 TITLE : Common causes of Paradox Engine error messages. This error can come from the testrest.cpp example which ships with the Paradox Engine and Database Framework if share is not loaded. "Floating point error: Domain" - Most likely caused by compiling the Paradox Engine in the small memory model. The Paradox Engine must be compiled in the LARGE memory model. Stack overflow can also cause this problem. DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains.