Skip to main content
Version: 2025

SalSqlSessionHandle

Namespace: PPJ.Runtime.Sql

Assembly: PPJ.Web.49 (4.9.0.0)

Summary description for SalSqlSessionHandle.

public struct SalSqlSessionHandle : ValueType, ISerializable, IXmlSerializable

Properties

Instance memberConnection

IDbConnection: Returns the connection object

Instance memberHandle

IntPtr: Returns the handle for this SalSqlSessionHandle object

Instance memberIsNull

Boolean: Checks if this SalSqlSessionHandle object contains a null db connection.

Instance memberLastError

SalSqlError: Returns the last error occurred.

Instance memberLastErrorCode

SalNumber: Returns the last error code.

Instance memberLastErrorMessage

SalString: Returns the last error message.

Instance memberLastErrorPosition

SalNumber: Returns the last error position.

Instance memberProperties

SqlProperties: Returns the properties associated with the connection.

Methods

Instance memberCommit()

Commits the current transaction associated with the specified session.

Returns: Boolean.

Instance memberCommit(errorHandler)

Commits the current transaction associated with the specified session.

ParameterTypeDescription
errorHandlerWhenSqlErrorHandler

Returns: Boolean.

Instance memberCreate(connectionString)

Creates a new session.

ParameterTypeDescription
connectionStringString

Returns: Boolean.

Instance memberCreate(connectionString, errorHandler)

Creates a new session.

ParameterTypeDescription
connectionStringString
errorHandlerWhenSqlErrorHandler

Returns: Boolean.

Instance memberCreateStatement(hSql)

ParameterTypeDescription
hSqlSalSqlHandle&

Returns: Boolean.

Instance memberFree()

Frees the session.

Returns: Boolean. bool

Instance memberFree(errorHandler)

Frees the session.

ParameterTypeDescription
errorHandlerWhenSqlErrorHandler

Returns: Boolean.

Static memberFromHandle(handle)

Returns the SalSqlSessionHandle object from the handle

ParameterTypeDescription
handleIntPtr

Returns: SalSqlSessionHandle.

Instance memberGetErrorInfo(nErrorNumber, sErrorDescription, sSqlState)

ParameterTypeDescription
nErrorNumberSalNumber&
sErrorDescriptionSalString&
sSqlStateSalString&

Returns: Boolean.

Instance memberGetObjectData(info, context)

get object data

ParameterTypeDescription
infoSerializationInfo
contextStreamingContext

Instance memberGetParameter(parameter, nValue, sValue)

ParameterTypeDescription
parameterInt32
nValueSalNumber&
sValueSalString&

Returns: Boolean.

Instance memberRollback()

Rolls back the current transaction associated with the specified session.

Returns: Boolean.

Instance memberRollback(errorHandler)

Rolls back the current transaction associated with the specified session.

ParameterTypeDescription
errorHandlerWhenSqlErrorHandler

Returns: Boolean.

Instance memberSetParameter(parameter, numberValue, stringValue)

Sets the value of the specified session property.

ParameterTypeDescription
parameterInt32
numberValueInt32
stringValueString

Returns: Boolean.

Used By

NameDescription
Sal.WindowHandleToNumberConverts a SalSqlSessionHandle to a number.
SalSqlHandle.GetSessionHandleThis call returns the session handle to which the specified statement handle belongs. The SqlHandle must have been created using SqlCreateStatement function and not by calling SqlConnect function.
SalSqlSessionHandle.FromHandleReturns the SalSqlSessionHandle object from the handle
Sql.CommitSessionCommits the current transaction associated with the specified session.
Sql.CreateStatement
Sql.RollbackSessionRolls back the current transaction associated with the specified session.
Sql.GetSessionErrorInfo
Sql.SetSessionParameterSets the value of the specified session property.
Sql.GetSessionParameter