Icon GetServerSessionInfo Method

function GetServerSessionInfo(SessionNum: Integer; var
      SessionID: Integer; var CreatedOn: TDateTime; var
      LastConnectedOn: TDateTime; var UserName: String; var
      UserAddress: String; var Encrypted: Boolean; var
      LastUserAddress: String): Boolean

Usage

Call the GetServerSessionInfo method to retrieve session information for a specific session on a database server. The SessionNum parameter indicates the session number for which to retrieve the session information. This number represents the logical position of a given session in the list of sessions on a database server, from 1 to the return value of the GetServerSessionCount method. The SessionID parameter returns unique ID assigned to the session by the database server. The CreatedOn parameter returns the date and time when the session was created on the database server. The LastConnectedOn parameter returns the date and time when the session was last connected to the database server. The UserName parameter returns the name of the user that created the session on the database server. The UserAddress parameter returns the IP address of the user that created the session on the database server. If the session is not currently connected, then this parameter will be blank. The Encrypted parameter returns whether the session is encrypted or not. The LastUserAddress parameter returns the last known IP address of the session, regardless of whether the session is connected or not. This parameter is useful for determining the location of a workstation that still has an active session but has disconnected.

Information This method is only valid when the engine is running as a database server and the EngineType is set to etServer.
Image