Using VSTs to find out which user to locking a record

Chris Kelleher

Administrator
Staff member
>Is it possible to read the record locking table. I know that I can see the
>details in promon and also the details are displayed in the bottom message
>line or an alert-box. However my screen is only 20 by 8 so I wish to
create
>a frame and display the user id details of who is locking the record. I
>have tried looking through the _Files but cannot find the info.
>

The record locking table is "_lock" (Virtual System Tables). You should
activates this by
proutil database -C enablevst.

Program sample:

<BLOCKQUOTE><font size="1" face="Arial, Verdana">code:</font><HR><pre>
for each _lock where _lock._lock-usr <> ?
and _lock._lock-recid <> ?,
first _connect where _connect._connect-id = _lock._lock-id
and _connect._connect-usr = _lock._lock-usr,
first _trans where _trans._trans-usrnum = _connect._connect-usr
no-lock:
message substitute("Record in use by &1 on &2",
_lock._lock-name,_connect._connect-device)
view-as alert-box.
end.
[/code]
 
Top