SalSqlSessionHandle
Namespace: PPJ.Runtime.Sql
Assembly: PPJ.Runtime.49 (4.9.0.0)
Summary description for SalSqlSessionHandle.
- C#
- VB.NET
public struct SalSqlSessionHandle : ValueType, ISerializable, IXmlSerializable
Public Structure SalSqlSessionHandle
Implements ValueType, ISerializable, IXmlSerializable
Properties
Connection
IDbConnection: Returns the connection object
Handle
IntPtr: Returns the handle for this SalSqlSessionHandle object
IsNull
Boolean: Checks if this SalSqlSessionHandle object contains a null db connection.
LastError
SalSqlError: Returns the last error occurred.
LastErrorCode
SalNumber: Returns the last error code.
LastErrorMessage
SalString: Returns the last error message.
LastErrorPosition
SalNumber: Returns the last error position.
Properties
SqlProperties: Returns the properties associated with the connection.
Methods
Commit()
Commits the current transaction associated with the specified session.
Returns: Boolean.
Commit(errorHandler)
Commits the current transaction associated with the specified session.
| Parameter | Type | Description |
|---|---|---|
| errorHandler | WhenSqlErrorHandler |
Returns: Boolean.
Create(connectionString)
Creates a new session.
| Parameter | Type | Description |
|---|---|---|
| connectionString | String |
Returns: Boolean.
Create(connectionString, errorHandler)
Creates a new session.
| Parameter | Type | Description |
|---|---|---|
| connectionString | String | |
| errorHandler | WhenSqlErrorHandler |
Returns: Boolean.
CreateStatement(hSql)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle& |
Returns: Boolean.
Free()
Frees the session.
Returns: Boolean. bool
Free(errorHandler)
Frees the session.
| Parameter | Type | Description |
|---|---|---|
| errorHandler | WhenSqlErrorHandler |
Returns: Boolean.
FromHandle(handle)
Returns the SalSqlSessionHandle object from the handle
| Parameter | Type | Description |
|---|---|---|
| handle | IntPtr |
Returns: SalSqlSessionHandle.
GetErrorInfo(nErrorNumber, sErrorDescription, sSqlState)
| Parameter | Type | Description |
|---|---|---|
| nErrorNumber | SalNumber& | |
| sErrorDescription | SalString& | |
| sSqlState | SalString& |
Returns: Boolean.
GetObjectData(info, context)
get object data
| Parameter | Type | Description |
|---|---|---|
| info | SerializationInfo | |
| context | StreamingContext |
GetParameter(parameter, nValue, sValue)
| Parameter | Type | Description |
|---|---|---|
| parameter | Int32 | |
| nValue | SalNumber& | |
| sValue | SalString& |
Returns: Boolean.
Rollback()
Rolls back the current transaction associated with the specified session.
Returns: Boolean.
Rollback(errorHandler)
Rolls back the current transaction associated with the specified session.
| Parameter | Type | Description |
|---|---|---|
| errorHandler | WhenSqlErrorHandler |
Returns: Boolean.
SetParameter(parameter, numberValue, stringValue)
Sets the value of the specified session property.
| Parameter | Type | Description |
|---|---|---|
| parameter | Int32 | |
| numberValue | Int32 | |
| stringValue | String |
Returns: Boolean.
Used By
| Name | Description |
|---|---|
| Sal.WindowHandleToNumber | Converts a SalSqlSessionHandle to a number. |
| SalSqlHandle.GetSessionHandle | This 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.FromHandle | Returns the SalSqlSessionHandle object from the handle |
| Sql.RollbackSession | Rolls back the current transaction associated with the specified session. |
| Sql.GetSessionErrorInfo | |
| Sql.SetSessionParameter | Sets the value of the specified session property. |
| Sql.GetSessionParameter | |
| Sql.CommitSession | Commits the current transaction associated with the specified session. |
| Sql.CreateStatement |