Information générale
Titre:
DataEnvironment - OpenTables firing before BeforeOpenTables
I've rarely ever put code into the DataEnvironment, but am researching for someone how to stop a second user from bringing up a form that another user has opened where the tables involved are opened exclusively. User1 - Form1 - Opens 2 tables exclusively........
When the second user attempts to open the form, they would like a simple message to be displayed stating the tables are in use. I've tried USED("TableAlias") - by firing up two instances of the app as two different users and it is not recognized (Private Datasessions).
It always returns .F. but the DE of the second attempt to open the form catches it and blows up.
I put in some wait window commands and found that the .OpenTables method is firing and then the .BeforeOpenTables method is firing. I don't think that this is right. Any idea what is going on here?
I guess I need to be able to suggest a good methodology to trap when a form that requires exclusive use of a table is trying to be loaded by another user. I can't seem to find a smooth solution.
Thanks,
Steve
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