StartSession(ClientTypes,Int32) Method
- Last UpdatedNov 06, 2025
- 1 minute read
The StartSession() method starts a session of a specified client type. The method checks that a license of the specified type is available and, if so, uses the license for this session.
If session information is being specified, this overload of the method specifies the session information by its session ID.
The SessionID parameter is by reference. When used within System Platform, this must be a locally declared string. For examples, see Creating and Starting Sessions.
'Declaration
Public Overloads Shared Sub StartSession( _
ByVal clientType As ClientTypes, _
ByRef sessionId As Integer _
)
'Usage
Dim clientType As ClientTypes
Dim sessionId As Integer
Session.StartSession(clientType, sessionId)
public static void StartSession(
ClientTypes clientType,
out int sessionId
)
Parameters
- clientType
- Required. Holds the client type.
- sessionId
Output. Holds the session ID and thus the user who is making this method call.
If successful, the method inserts an entry into the Sessn table and generates a unique session_id that is used to track this session in the future. The client needs to store this session ID for future calls, even if the session is created via the Web Server.
The client_address and reqd_events fields are for future implementation only, and are currently saved to the database but ignored thereafter.