[Progress Communities] [Progress OpenEdge ABL] Forum Post: Confusion about finding the VST (_connect) details for a given _myconnection record

  • Thread starter Thread starter dbeavon
  • Start date Start date
Status
Not open for further replies.
D

dbeavon

Guest
I need details out of the VST (_connect) for some conditional logic. For example, the field _Connect._Connect-ClientType is of interest to me (will tell me if my session is running code with a client-server connection or shared-memory). What I've been doing thus far is to first get the _MyConn-Pid from _MyConnection. Then I use the PID to access the related _Connect record. It is similar to what is happening in the following KB. Notice the sample code. Progress KB - How to retrieve user number and PID of DB connection DEF VAR servernum AS INTEGER NO-UNDO. FIND FIRST _Myconnection. FIND FIRST _connect WHERE _connect._connect-pid = _Myconnection._myconn-pid. ASSIGN servernum=_connect._connect-server. FIND FIRST _connect WHERE _connect._connect-usr = servernum. DISPLAY _connect._connect-pid. The example results in very buggy behavior. The PID is NOT NECESSARILY unique. Especially now that we have remote ABL code that is connecting from PASOE instances. ... It is not unusual for there to be multiple ABL client session or PASOE session that has have an identical PID (because they run on different machines). I suppose I will need to use BOTH the pid and the user number to find the related _connect details, right? IE. it might look something like so: FOR EACH _Connect WHERE _Connect._connect-pid = p_ConnectionPid AND _Connect._connect-usr = p_ConnectionUserId It is odd that the KB would have such a buggy example. I think I've seen more than one example from progress where the _connect record is found using only the PID. The bigger underlying question is what are the unique constraints on the _Connect data in the vst? Is it _Connect-Usr? Is it the combination of _Connect-Usr and _Connect-Pid? the same PID. can easily be more FIND _MyConnection. DISPLAY _MyConn-pid.

Continue reading...
 
Status
Not open for further replies.
Back
Top