StartSession(ClientTypes,DBString,DBString,Int32,String,String,String,String,String,String,String,String,Int32) Method
- Last UpdatedNov 06, 2025
- 2 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 returns session information via output parameters.
'Declaration
Public Overloads Shared Sub StartSession( _
ByVal clientType As ClientTypes, _
ByVal clientAddress As DBString, _
ByVal reqdEvents As DBString, _
ByRef sessionId As Integer, _
ByRef dbServer As String, _
ByRef database As String, _
ByRef dbVersion As String, _
ByRef spVersion As String, _
ByRef defDataVersion As String, _
ByRef dbmsName As String, _
ByRef dbmsVersion As String, _
ByRef provider As String, _
ByRef daysToExpire As Integer _
)
'Usage
Dim clientType As ClientTypes
Dim clientAddress As DBString
Dim reqdEvents As DBString
Dim sessionId As Integer
Dim dbServer As String
Dim database As String
Dim dbVersion As String
Dim spVersion As String
Dim defDataVersion As String
Dim dbmsName As String
Dim dbmsVersion As String
Dim provider As String
Dim daysToExpire As Integer
Session.StartSession(clientType, clientAddress, reqdEvents, sessionId, dbServer, database, dbVersion, spVersion, defDataVersion, dbmsName, dbmsVersion, provider, daysToExpire)
public static void StartSession(
ClientTypes clientType,
DBString clientAddress,
DBString reqdEvents,
out int sessionId,
out string dbServer,
out string database,
out string dbVersion,
out string spVersion,
out string defDataVersion,
out string dbmsName,
out string dbmsVersion,
out string provider,
out int daysToExpire
)
Parameters
- clientType
- Required. Holds the client type.
- clientAddress
- Optional. Holds the client’s callback address for event notifications from the Middleware.
- reqdEvents
Output. Holds an XML-encoded string specifying for which events the client wishes to receive event notifications from the Middleware. Not implemented.
- sessionId
Output. Holds the session ID and thus the user who is making this method call.
- dbServer
- Output. Holds the returned name of the server.
- database
- Output. Holds the returned name of the database.
- dbVersion
- Output. Holds the returned version of the database.
- spVersion
- Output. Holds the returned version of the stored procedure.
- defDataVersion
- Output. Holds the returned version of the default data scripts used to populate the database initially.
- dbmsName
- Output. Holds the returned DBMS name.
- dbmsVersion
- Output. Holds the returned DBMS version.
- provider
- Output. Holds the returned name of the connection provider.
- daysToExpire
- Output. Holds the returned number of days to expire the license.
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.