Hi,
I've been running into some race conditions.
I thought I could solve them with an error routine triggered by a failed
FLOCK or RLOCK. The error routine would save the current file state
with a CREATE VIEW and close all files to allow the other user(s) to
complete their tasks and then restore the view and continue with normal
program execution.
The problem is that CREATE VIEW doesn't save the record pointers. I
thought I could circumvent this by saving RECNO(i) in an array and then
restoring. But I ran into problems.
The major problem is that you can't simply GOTO the saved record number
in each table when there are relations involved. You have to go to the
record number in the master table first and then to each child table.
If there is more than one level of relations, you have to work down the
relation tree.
I realize I could write code for each specific instance where a RLOCK or
FLOCK was used to save that particular state, but that would be crude
and time consuming. I would much prefer a general solution.
Has anyone worked out a solution to this problem? I could really use
some help.
Thanks, Frank