Confusion about vst fields on _connect

Posted by dbeavon on 25-Feb-2019 15:13

See the following link:

https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/dmadm%2Fdatabase-connection-(-connect).html%23

There is a field named "_Connect-Id" that says it is the user number.

.. and there there is field named "_Connect-Usr" that says it is the user number.

I'm assuming the second one (_Connect-Usr) is the user number where the database is concerned?  How do I know for sure?

Posted by Fernando Souza on 25-Feb-2019 15:29

_Connect_Usr is the user number.

_Connect-id works as the rowid for the record.

All Replies

Posted by Fernando Souza on 25-Feb-2019 15:29

_Connect_Usr is the user number.

_Connect-id works as the rowid for the record.

Posted by dbeavon on 25-Feb-2019 15:39

Thanks!  I wish the docs were a bit less confusing.  

Who really needs the "rowid" anyway?  That one should have a notation which says to avoid the field altogether.

Posted by George Potemkin on 25-Feb-2019 15:47

_Connect-id equates _Connect-Usr + 1. Always.

Using _Connect-id to find a _Connect record for a specified _Connect-Usr is faster than to use the _Connect-Usr itself.

Posted by Fernando Souza on 25-Feb-2019 15:48

Yes, the doc should be made clear.Will follow up on that.

As for the code in the kbase, I'm sure the code was not written with PASOE in mind.

You could just search by the user-id, since it's unique. Or if you keep the pid, then use _Connect-Tid as well.

Posted by Rob Fitzpatrick on 25-Feb-2019 15:58

> Who really needs the "rowid" anyway?  That one should have a notation which says to avoid the field altogether.

You shouldn't avoid it.  Each VST has only one index, on the "-id" field.  Querying the table via that field, if you can, is the most efficient way to access it.  In the case of large VSTs like _UserTableStat/_UserIndexStat, it's a valuable optimization.

This thread is closed