Information générale
Catégorie:
Codage, syntaxe et commandes
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement