Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataEnvironment - OpenTables firing before BeforeOpenTables
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
DataEnvironment - OpenTables firing before BeforeOpenTables
Miscellaneous
Thread ID:
00147989
Message ID:
00147989
Views:
89
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
Next
Reply
Map
View

Click here to load this message in the networking platform