Leenaa
5th February 2003, 06:34
hi all !
we have a session which creats a lock while running,and if somebody else wants to access that session it shows a message that this session is already in use,
I want to show the user name (who created the lock )with that message,how can i get it,
I know there is one command like APPL.GET.USER
pls tell me how can i use it,pls tell me with syntax.
thanx in advance !
NPRao
5th February 2003, 08:44
Leena,
you can use the search option on the Board to find more info here about the topics already discussed.
Ýs it possible to let a session run by only one user. (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=845&highlight=APPL.GET.USER)
Locking Applications (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=6080&highlight=APPL.GET.USER)
How to Limit number of start same session by same user? (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=1782&highlight=APPL.GET.USER)
I hope it helps you out.
morpheus
5th February 2003, 08:47
long APPL.GET.USER( string name(32), ref string user(12) )
This function retrieves the BAAN user name of the user who has created the application lock.
Possible return values:
0 : OK
-1 : lock not found
Leenaa
5th February 2003, 09:30
hi ,
i m unable to do it,
can u plz tell me step wise
from declaration to end .
thanx for ur help,
:mad:
morpheus
5th February 2003, 10:47
long id
domain tcitem baan_user
id = appl.set("leenaa",<MODE>) |This sets the lock, if id = 0.
id = appl.get.user("leenaa",baan_user) | If id = 0, then variable baan_user will have the user name.
Now, use baan_user in your message, using %s.
Hope this helps.
Leenaa
5th February 2003, 11:35
Thanx morpheus !!!!!!!!!!
It's working !
thanx again for ur help !