Error solutions and limitations of Paradox Engine

by Jan 24, 1996

 Technical Information Database

TI239B.txt   Error solutions and limitations of Paradox Engine
Category   :General Programming
Platform    :All
Product    :Paradox Engine  All

Limitations of the Paradox Engine

The Paradox Engine version 3.01 was intended for 
use on DOS 3.1 through DOS 5.x, and/or Windows 
3.x environments.  It can also be used in 
conjunction with the following networks:
1)  IBM Token Ring version 1.1x
2)  Novell NetWare version 2.0 through 3.12
3)  3Com 3+ Share network version 1.5.x
4)  DEC Pathworks version 1.x
5)  Microsoft LAN Manager version 2.x
6)  Banyan Vines networks version 2.1x
7)  AT&T StarGROUP for DOS version 3.1 through 5.x

The Paradox Engine has NOT been certified on the 
following OS or environments:
1)  Windows NT 3.x
2)  Windows 95
3)  Windows for Workgroups 3.x
4)  MS / IBM DOS 6.x

The Paradox Engine has NOT been certified on the 
following networks:
1)  Novell NetWare version 4.x
2)  Windows for Workgroups 3.x peer-to-peer
3)  Windows NT 3.x peer-to-peer
4)  Lantastic 

The Paradox Engine has NOT been certified on the 
following chipsets:
1)  Intel Pentium (any speed)
2)  Cyrex
3)  AMD

The Paradox engine relies on timing for some 
operations.  The speed of some CPUs can cause file 
lock contentions in multi-user environments.

Common Problems that occur using the Paradox Engine
Internal errors: Numbers > 200 - 
1) Memory corruption and table corruption are the 
main causes of these internal errors.
2) These errors can be caused by using the Paradox 
Engine on tables that are also used by any 
IDAPI / BDE application; This includes products such 
as: Visual dBASE, Paradox, Quattro Pro.  To temporarily 
fix the error, use the TUTILITY.EXE that ships with 
Paradox 4.0 for DOS and repair, not verify, the table.  
TUTILITY is available in the PDOXDOS forum on CompuServe.  
There is no permanent solution to this problem.

Random GPFs when converting from BC3.x to BC4.x - 
A file named SETJMP.OBJ in the BCxLIBCOMPAT directory 
needs to be linked into the EXE.  RTTI necessitates new 
jump offsets for the Paradox Engine: this file contains 
the new offsets.

If an application crashes with the Paradox Engine still 
initialized, you MUST remove the .NET file and .LCK files 
associated with the program.  

Specific Error Numbers with causes and solutions

"Error# 4: File is locked" -
One possible way around this error is to create a retry loop
which performs the desired operation x amount of  times. 
The engine will do a validity check of the lock after 
approximately four iterations, which may clear up the 
contention. If CPU speed is too great i.e. Pentium 60Mhz, 
a greater number might be needed.  See TI1002.

"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 ( or ) 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 and
file existing within the same directory. Delete the .net
files and change the net directory of one of the

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.

  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

  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 file ). Trying to access Paradox 5 or 7 tables
with PXEng 3.x.  The Paradox Engine only works with v4.x or 
earlier tables.

  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():
  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
Paradox Engine 3.0 available on our local BBS at ( 408 )
431-5096 in the 'patch' section, and on CompuServe in the
BDEVTOOLS forum, lib 11. The file 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
  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:pdxnetdir.
  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" -
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 is located. This error also
occurs if the net file has gotten corrupted. Delete the net
file to resolve this problem.

"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" -
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

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


7/15/98 3:24:23 PM

Article originally contributed by Borland Staff