I have a forms with private data session.
Cursors are created in those forms load event with optimistics table buffering.
create cursor TEMPCURS from array aStru
cursorsetprop( 'Buffering', 5 )
Forms have a grid (invoice rows) based on this cursor.
This cursor has many relations to tables in LAN server set by SET RELATION command in grid column combobox init event.
There are a number of users in network and a number of forms in screen using
the same program.
I have a command
SET REPROCESS TO 30 SECONDS
in datasesson init.
Users can add rows to this cursor in grid and over-type combobox column contents.
I use the following command to store the entered data
SELECT TEMPCURS
IF LOCK()
REPLACE mydata with relalias.myvalue
unlock
else
messagebox('Lock Fails !!!' + str(recno()) )
endif
Locking a temporary cursor must be always successful.
However, sometimes users get Lock Fail errors and recno() is -2
Why LOCK() command fails in this situation sometimes?
Andrus