I have a "switchboard" style menu for my application.
On the click method of the buttons I have placed the following code:
mCOUNT = aused(tablesused)
ONE = 0
TWO = 0
THREE = 0
FOUR = 0
FIVE = 0
IF mCOUNT>0
ONE = ascan(tablesused, "INCOMINGBNS")
TWO = ascan(tablesused, "INCOMINGIPT")
THREE = ascan(tablesused, "CUCAISSE")
FOUR = ascan(tablesused, "OUTIPT")
FIVE = ascan(tablesused, "OUTWIRE")
RELEASE tablesused
ENDIF
If ONE + TWO + THREE + FOUR + FIVE >0
*RELEASE TABLESused
RELEASE mCOUNT
RELEASE ONE
RELEASE TWO
RELEASE THREE
RELEASE FOUR
RELEASE FIVE
=MESSAGEBOX("ACCESS PROHIBITED - Another user is Entering Data ",16,"CUCM PROGRAM")
ELSE
RELEASE mCOUNT
RELEASE ONE
RELEASE TWO
RELEASE THREE
RELEASE FOUR
RELEASE FIVE
THISFORM.visible = .f.
DO FORM Incoming
ENDIF
The intent is to determine if certain tables are open. If they are, access should be restricted. When I run this on my local P.C. and open a table first, I am not allowed to open the form. When I run the compiled version on the network, it doesn't work - it allows users to open forms even if the table aliases specified are already open.
Does anyone have a better alternative or suggestions on how to recognize which tables are opened on a network application? ASCAN and AUSED aren't doing the trick
Thanks, AL WILLIAMS
Al Williams
Anola MB, CANADA