I am trying to determine the source of a problem in an app written with
the Paradox Engine 3.0 and Borland (or Turbo) Pascal 7. The application
uses Paradox 4.0 tables and runs on a Novell 3.12 network. I am a Delphi
programmer and familiar with Paradox/DOS and PAL, but I don't know much
about the PxEngine, so please be gentle!
The problem is that occasionally 2 users seem to be able to place a full
lock on the same table simultaneously. The code first places a full lock
on the table using PXNetFileLock, then it opens the table, then locks it
again using PXNetTblLock. Now it grabs a value (which should be unique)
from the record, increments the value in the table and posts the record.
Finally it unlocks the table using PXNetTblUnlock, closes the table and
then unlocks it again using PXNetFileUnlock. There is plenty of error
checking throughout to ensure that it has succeeded before proceeding.
The symptom is that when 3 or more users are using this part of the
system simultaneously, occsaionally two or more of them will get the same
value, which should be unique.
Another routine that accesses the same table (it only adds records,
doesn't change or delete them) only uses PXNetTableLock and
PXNetTableUnlock to lock the table. This leads me to wonder if the
double-locking is somehow cancelling itself out?
Any suggestions / comments (or even a bettter place to go for help) would