General information
Category:
Coding, syntax & commands
I am converting a simple single user application to multiuser for the first time.
Assume that I have a simple form that updates a table containing one record.
I have done the following:
set exclusive off
buffermode=pessimistic
windowtype=modeless
datasession=private datasession
the form has a commandbutton with code in the click event as follows:
tableupdate()
my application consists of the form and a program containing this code:
do myform
read events
I build the project into an .exe which works fine.
Then I run two instances of the .exe
I change a field in the record on one instance, without updating. Then I attempt to change a field in the second instance. I get a message "attempting to lock... press ESC to cancel". I press escape and get a message "Record is in use by another user". The choices are Cancel, Ignore and Help. I choose Ignore. But the program terminates! Why is this? I want the attempted change to fail and make the user to wait until the record is available and try again. [If I trap the error and put in my own error message the same thing happens. I have a much more complicated version of this application and this one works correctly the first time, but the second time the user attempts to change a locked record, the program terminates.]
I am sure that I am missing something very simple. Can someone help me?
Jay
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only