Brosilav,
Thank you for the response, I really appreciate it.
No, I do not have anybody opening any table exclusively through my application.
The command:
rlock("0","stafile")
is correct based on the second option which is [cRecordNumberList, nWorkArea | cTableAlias])
I am trying to lock the file header in order to insert a record into the table.
I do issue a message if any save failed, that's one way they know that they are losing data.
Thank you again for your kind response,
Dawa
Dawa,
Is there anywhere in your application that the table Stafile is open exclusive? May be one user attempt to insert a record therefore other is open that table exlusive, doing some REINDEX or PACK...
By the way according to help the right sintax of RLOCK is:
RLOCK([nWorkArea | cTableAlias] | [cRecordNumberList, nWorkArea
| cTableAlias])
so you must change
if rlock("0",'stafile')
to
if rlock('stafile')
In addition, You can put a messagebox before ROLLBACK to annonce to user that no changes is commited
Dawa Tsering
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature