Sql
Namespace: PPJ.Runtime.Sql
Assembly: PPJ.Web.49 (4.9.0.0)
Summary description for Sql.
- C#
- VB.NET
public class Sql
Public Class Sql
Properties
Database
SalString: This string variable contains the name of the database to which the application connects.
IsolationLevel
SalString: This system variable sets the isolation level for the next connection to a database server. The isolation level controls the effect that changes made by one user have on another user accessing the same tables. Valid strings are: - Read Repeatability (RR) - Cursor Stability (CS) - Release Locks (RL)
Password
SalString: This string variable contains a password necessary to access a database. The default password is SYSADM.
ResultSet
Boolean: Result set status flag.
ResultSetMode
ResultSetMode: Behavior for when the ResultSet mode is on.
UniversalDataLink
SalString: SqlUDL is a system variable that can contain a provider name or the name of a UDL file to use for OLE DB connection information.
User
SalString: This string variable contains a user name necessary to access a database. The default authorization name is SYSADM.
Methods
ClearImmediate()
Disconnects the internal Sql Handle from a database.
Returns: SalBoolean.
Close(hSql)
Deprecated:
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle& |
Returns: SalBoolean.
CloseAllSPResultSets(hSql)
Closes any result sets generated by the execution of a stored procedure.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle |
Returns: SalBoolean. bOk
CloseResultSet(hSql)
Close the current result set.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle |
Returns: SalBoolean. bOk
Commit(hSql)
Commits all of the SQL transaction's cursors that are connected to the same database.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle |
Returns: SalBoolean.
Commit(hSql, errorHandler)
Commits all of the SQL transaction's cursors that are connected to the same database.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
CommitSession(hSession)
Commits the current transaction associated with the specified session.
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle |
Returns: SalBoolean.
CommitSession(hSession, errorHandler)
Commits the current transaction associated with the specified session.
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
Connect(hSql)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle& |
Returns: SalBoolean.
Connect(hSql, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
ConnectImmediate()
Connects the internal Sql Handle used for SqlImmediate calls.
Returns: SalBoolean.
ConnectTransaction(hSql, sName)
Deprecated:
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle& | |
| sName | SalString |
Returns: SalBoolean.
ConnectUsingCursor(hSql, nCursor)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nCursor | SalNumber |
Returns: SalBoolean.
ContextClear(hSql)
Clears the sql context.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle |
Returns: SalBoolean.
ContextSet(hSql)
Sets the sql context to the current form.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle |
Returns: SalBoolean.
ContextSetToForm(hSql, hWnd)
Sets the context to the specified form.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| hWnd | SalWindowHandle |
Returns: SalBoolean.
CreateSession(hSession, sSessionProperties)
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle& | |
| sSessionProperties | SalString |
Returns: SalBoolean.
CreateSession(hSession, sSessionProperties, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle& | |
| sSessionProperties | SalString | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
CreateStatement(hSession, hSql)
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle | |
| hSql | SalSqlHandle& |
Returns: SalBoolean.
DirectoryByName(sServerName, sArrayNames)
Returns the database names on the specified server.
| Parameter | Type | Description |
|---|---|---|
| sServerName | SalString | The name of a server. |
| sArrayNames | SalArray<SalString> | The name of an array of strings containing database names. |
Returns: SalBoolean. bOk
Disconnect(hSql)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle& |
Returns: SalBoolean.
Disconnect(hSql, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
DisconnectWithoutCursor(hSql)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle |
Returns: SalBoolean.
DropStoredCmd(hSql, sName)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sName | SalString |
Returns: SalBoolean.
Error(hSql)
Returns the most recent error code for the specified Sql Handle.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle |
Returns: SalNumber.
ErrorText(nError, nType, sError, nLength, nRealLength)
| Parameter | Type | Description |
|---|---|---|
| nError | SalNumber | |
| nType | SalNumber | |
| sError | SalString& | |
| nLength | SalNumber | |
| nRealLength | SalNumber& |
Returns: SalBoolean.
Execute(hSql)
Executes a SQL statement that was previously prepared.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle |
Returns: SalBoolean. bOk
Execute(hSql, errorHandler)
Executes a SQL statement that was previously prepared.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
ExecutionPlan(hSql, sString, nLength)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sString | SalString | |
| nLength | SalNumber |
Returns: SalBoolean.
Exists(sSelect, bExists)
| Parameter | Type | Description |
|---|---|---|
| sSelect | SalString | |
| bExists | SalBoolean& |
Returns: SalBoolean.
Exists(sSelect, bExists, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| sSelect | SalString | |
| bExists | SalBoolean& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
ExtractArgs(wParam, lParam, hSql, nErrorCode, nErrorPosition)
| Parameter | Type | Description |
|---|---|---|
| wParam | SalNumber | |
| lParam | SalNumber | |
| hSql | SalSqlHandle& | |
| nErrorCode | SalNumber& | |
| nErrorPosition | SalNumber& |
Returns: SalBoolean.
FetchNext(hSql, nInd)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nInd | SalNumber& |
Returns: SalBoolean.
FetchNext(hSql, nInd, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nInd | SalNumber& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
FetchPrevious(hSql, nInd)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nInd | SalNumber& |
Returns: SalBoolean.
FetchPrevious(hSql, nInd, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nInd | SalNumber& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
FetchRow(hSql, nRow, nInd)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nRow | SalNumber | |
| nInd | SalNumber& |
Returns: SalBoolean.
FetchRow(hSql, nRow, nInd, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nRow | SalNumber | |
| nInd | SalNumber& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
FreeSession(hSession)
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle& |
Returns: SalBoolean.
FreeSession(hSession, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
GetCmdOrRowsetPtr(hSql, bCmdOrRowset, numOLEDBPtr)
Deprecated:
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| bCmdOrRowset | SalBoolean | |
| numOLEDBPtr | SalNumber& |
Returns: SalBoolean.
GetCursor(hSql)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle |
Returns: SalNumber.
GetDSOrSessionPtr(hSql, bDSOrSession, numOLEDBPtr)
Deprecated:
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| bDSOrSession | SalBoolean | |
| numOLEDBPtr | SalNumber& |
Returns: SalBoolean.
GetError(hSql, nError, sError)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nError | SalNumber& | |
| sError | SalString& |
Returns: SalBoolean.
GetErrorPosition(hSql, nPos)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nPos | SalNumber& |
Returns: SalBoolean.
GetErrorText(nError, sError)
| Parameter | Type | Description |
|---|---|---|
| nError | SalNumber | |
| sError | SalString& |
Returns: SalBoolean.
GetErrorTextX(nError)
Returns the error text corresponding to the error number.
| Parameter | Type | Description |
|---|---|---|
| nError | SalNumber |
Returns: SalString.
GetLastStatement()
Returns the last SQL statement.
Returns: SalString. sSqlStatement
GetModifiedRows(hSql, nCount)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nCount | SalNumber& |
Returns: SalBoolean.
GetNextSPResultSet(hSql, sIntoList, bEndOfRS)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sIntoList | SalString | |
| bEndOfRS | SalBoolean& |
Returns: SalBoolean.
GetParameter(hSql, nParameter, nNumber, sString)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nParameter | SalNumber | |
| nNumber | SalNumber& | |
| sString | SalString& |
Returns: SalBoolean.
GetParameterAll(hSql, nParameter, nNumber, sString, bNumber)
Deprecated:
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nParameter | SalNumber | |
| nNumber | SalNumber& | |
| sString | SalString& | |
| bNumber | SalBoolean |
Returns: SalBoolean.
GetResultSetCount(hSql, nCount)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nCount | SalNumber& |
Returns: SalBoolean.
GetResultSetCount(hSql, nCount, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nCount | SalNumber& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
GetRollbackFlag(hSql, bRollbackFlag)
Deprecated:
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| bRollbackFlag | SalBoolean& |
Returns: SalBoolean.
GetSessionErrorInfo(hSession, nErrorNumber, sErrorDescription, sSqlState)
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle | |
| nErrorNumber | SalNumber& | |
| sErrorDescription | SalString& | |
| sSqlState | SalString& |
Returns: SalBoolean.
GetSessionHandle(hSql, hSession)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| hSession | SalSqlSessionHandle& |
Returns: SalBoolean.
GetSessionParameter(hSession, nParameter, nValue, sValue)
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle | |
| nParameter | SalNumber | |
| nValue | SalNumber& | |
| sValue | SalString& |
Returns: SalBoolean.
GetSqlHandle(Number)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| Number | SalNumber |
Returns: SalSqlHandle.
GetStatementErrorInfo(hSql, nErrorNumber, sErrorDescription, sSqlState)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nErrorNumber | SalNumber& | |
| sErrorDescription | SalString& | |
| sSqlState | SalString& |
Returns: SalBoolean.
Immediate(sSqlCommand)
Prepares and executes a SQL statement.
| Parameter | Type | Description |
|---|---|---|
| sSqlCommand | SalString |
Returns: SalBoolean.
Immediate(sSqlCommand, errorHandler)
Prepares and executes a SQL statement.
| Parameter | Type | Description |
|---|---|---|
| sSqlCommand | SalString | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
ImmediateContext(command, context)
Prepares and executes a SQL statement using a different sql context.
| Parameter | Type | Description |
|---|---|---|
| command | SalString | |
| context | Object |
Returns: SalBoolean.
Open(hSql, sCursorName)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sCursorName | SalString |
Returns: SalBoolean.
OraPLSQLCommand(hSql, sCommand)
Executes an Oracle PL/SQL stored procedure. Supports dynamic arrays and receive array parameters.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sCommand | SalString |
Returns: SalBoolean.
OraPLSQLCommand(hSql, sCommand, errorHandler)
Executes an Oracle PL/SQL stored procedure. Supports dynamic arrays and receive array parameters.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sCommand | SalString | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
OraPLSQLExecute(hSql)
Executes the anonymous PL/SQL block that was prepared using SqlOraPLSQLPrepare.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle |
Returns: SalBoolean.
OraPLSQLExecute(hSql, errorHandler)
Executes the anonymous PL/SQL block that was prepared using SqlOraPLSQLPrepare.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
OraPLSQLPrepare(hSql, sAnonymousPLSQLBlock)
Compiles the anonymous PL/SQL block.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sAnonymousPLSQLBlock | SalString |
Returns: SalBoolean.
OraPLSQLPrepare(hSql, sAnonymousPLSQLBlock, errorHandler)
Compiles the anonymous PL/SQL block.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sAnonymousPLSQLBlock | SalString | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
OraPLSQLStringBindType(hSql, sBindName, nBindType)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sBindName | SalString | |
| nBindType | SalNumber |
Returns: SalBoolean.
Prepare(hSql, sSqlStatement)
Compiles a SQL statement for execution.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sSqlStatement | SalString |
Returns: SalBoolean.
Prepare(hSql, sSqlStatement, errorHandler)
Compiles a SQL statement for execution.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sSqlStatement | SalString | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
PrepareAndExecute(hSql, sSqlStatement)
Compiles and executes a SQL statement.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sSqlStatement | SalString |
Returns: SalBoolean.
PrepareAndExecute(hSql, sSqlStatement, errorHandler)
Compiles and executes a SQL statement.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sSqlStatement | SalString | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
PrepareSP(hSql, sStoredProc, sIntoList)
Prepares a stored procedure invocation statement.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sStoredProc | SalString | |
| sIntoList | SalString |
Returns: SalBoolean.
PrepareSP(hSql, sStoredProc, sIntoList, errorHandler)
Prepares a stored procedure invocation statement.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sStoredProc | SalString | |
| sIntoList | SalString | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
Retrieve(hSql, sName, sBindList, sIntoList)
Retrieves a SQLBase compiled command.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sName | SalString | |
| sBindList | SalString | |
| sIntoList | SalString |
Returns: SalBoolean.
Retrieve(hSql, sName, sBindList, sIntoList, errorHandler)
Retrieves a SQLBase compiled command.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sName | SalString | |
| sBindList | SalString | |
| sIntoList | SalString | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
Rollback(hSql)
Rolls back all of the SQL transaction's cursors that are connected to the same database.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle |
Returns: SalBoolean.
Rollback(hSql, errorHandler)
Rolls back all of the SQL transaction's cursors that are connected to the same database.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
RollbackSession(hSession)
Rolls back the current transaction associated with the specified session.
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle |
Returns: SalBoolean.
RollbackSession(hSession, errorHandler)
Rolls back the current transaction associated with the specified session.
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
SetInMessage(hSql, nSize)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nSize | SalNumber |
Returns: SalBoolean.
SetIsolationLevel(hSql, sIsolation)
Sets the isolation level.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sIsolation | SalString | CS=Cursor Stability; RL=Release Locks; RO=Read Only; RR=Read Repeatability |
Returns: SalBoolean.
SetLockTimeout(hSql, nTimeout)
Specifies the maximum time to wait before generating an error.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nTimeout | SalNumber |
Returns: SalBoolean.
SetLongBindDatatype(nBindVarNumber, nDatatype)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| nBindVarNumber | SalNumber | |
| nDatatype | SalNumber |
Returns: SalBoolean.
SetOutMessage(hSql, nSize)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nSize | SalNumber |
Returns: SalBoolean.
SetParameter(hSql, nParameter, nNumber, sString)
Sets the value of a database parameter.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nParameter | SalNumber | |
| nNumber | SalNumber | |
| sString | SalString |
Returns: SalBoolean.
SetParameterAll(hSql, nParameter, nValue, sValue, bNumber)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| nParameter | SalNumber | |
| nValue | SalNumber | |
| sValue | SalString | |
| bNumber | SalBoolean |
Returns: SalBoolean.
SetResultSet(hSql, bSet)
Turns result set mode on or off for all handles associated with the same connection.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| bSet | SalBoolean |
Returns: SalBoolean.
SetSessionParameter(hSession, nParameter, nValue, sValue)
Sets the value of the specified session property.
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle | |
| nParameter | SalNumber | |
| nValue | SalNumber | |
| sValue | SalString |
Returns: SalBoolean.
Store(hSql, sName, sSqlCommand)
Deprecated:
Not supported.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sName | SalString | |
| sSqlCommand | SalString |
Returns: SalBoolean.
VarSetup(hSql, context)
Saves the sql bind variables context.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| context | Object |
Returns: SalBoolean.
VarSetup(hSql)
Saves the sql bind variables context using the SalCompileAndEvaluate context.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle |
Returns: SalBoolean.
XDirectory(nServer, sDatabases)
Deprecated:
| Parameter | Type | Description |
|---|---|---|
| nServer | SalNumber | |
| sDatabases | SalArray`1& |
Returns: SalBoolean.