ALM Site Administration API Type Library
GetConnectionsCount Method
Description
Returns the number of active connections to the server.
Syntax
Visual Basic
Public Function GetConnectionsCount( _
   ByVal DomainName As String, _
   ByVal ProjectName As String _
) As String
Parameters
DomainName
The domain name.
ProjectName
The project name.
Return Type
On success, returns the number of connections as a string.
Remarks
If empty strings are passed as DomainName and ProjectName, GetConnectionsCount returns the number of all connections to all projects in all domains.
Example
Private Sub GetConnectionsCount(MyDomain$, MyProject$)

'The following Visual Basic example counts the connections
' to all projects in the MyDomain domain.
    Dim sDomainName As String
    Dim sProjectName As String
    Dim sReply As String
    Dim ReturnVal As String

    On Error GoTo err
    sDomainName = MyDomain
    sProjectName = MyProject
    ReturnVal = m_SAClient.GetConnectionsCount _
        (sDomainName, sProjectName)
    MsgBox "Number of connections: " + ReturnVal
    Exit Sub

err:
    MsgBox "Program failed:" + err.Description
End Sub
See Also