IConnectedUserInfo.HostName

Syntax

HostName: String;

HostName: string;

Description

The HostName property returns a name of the workstation from which the connection to the repository was established.

Example

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Users: IConnectedUsersInfo;
    User: IConnectedUserInfo;
Begin
    MB := MetabaseClass.Active;
    Users := MB.GetConnectedUsers;
    For Each User In Users Do
    Debug.WriteLine("Station: " + User.HostName + "; MAC address: " + User.NETAddress);
    Debug.WriteLine("DBMS user: " + User.UserName + "; OS user: " +
    User.UserOsName);
    End For;
End Sub UserProc;
 
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Users: IConnectedUsersInfo;
    User: IConnectedUserInfo;
Begin
    MB := Params.Metabase;
    Users := MB.GetConnectedUsers();
    
For Each User In Users Do
        System.Diagnostics.Debug.WriteLine(
"Station: " + User.HostName + "; MAC address: " + User.NETAddress);
        System.Diagnostics.Debug.WriteLine(
"DBMS user: " + User.UserName + "; OS user: " +
        User.UserOsName);
    
End For;
End Sub;

After executing the example information about all users, connected to the current repository, is displayed in a development environment console.

See also:

IConnectedUserInfo