Sql
Namespace: PPJ.Runtime.Sql
Assembly: PPJ.Runtime.49 (4.9.0.0)
Summary description for Sql.
- C#
- VB.NET
public class Sql
Public Class Sql
Fields
| Name | Type | Description |
|---|---|---|
| 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(serverName, arrayNames)
Returns the database names on the specified server.
| Parameter | Type | Description |
|---|---|---|
| serverName | SalString | The name of a server. |
| arrayNames | 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(select, exists)
| Parameter | Type | Description |
|---|---|---|
| select | SalString | |
| exists | SalBoolean& |
Returns: SalBoolean.
Exists(select, exists, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| select | SalString | |
| exists | SalBoolean& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
ExtractArgs(wParam, lParam, hSql, errorCode, errorPosition)
| Parameter | Type | Description |
|---|---|---|
| wParam | SalNumber | |
| lParam | SalNumber | |
| hSql | SalSqlHandle& | |
| errorCode | SalNumber& | |
| errorPosition | SalNumber& |
Returns: SalBoolean.
FetchNext(hSql, ind)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| ind | SalNumber& |
Returns: SalBoolean.
FetchNext(hSql, ind, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| ind | SalNumber& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
FetchPrevious(hSql, ind)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| ind | SalNumber& |
Returns: SalBoolean.
FetchPrevious(hSql, ind, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| ind | SalNumber& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
FetchRow(hSql, row, ind)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| row | SalNumber | |
| ind | SalNumber& |
Returns: SalBoolean.
FetchRow(hSql, row, ind, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| row | SalNumber | |
| ind | SalNumber& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
FreeSession(hSession, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle& | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
FreeSession(hSession)
| Parameter | Type | Description |
|---|---|---|
| hSession | SalSqlSessionHandle& |
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, numError, strError)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| numError | SalNumber& | |
| strError | SalString& |
Returns: SalBoolean.
GetErrorPosition(hSql, pos)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| pos | SalNumber& |
Returns: SalBoolean.
GetErrorText(nError, sError)
| Parameter | Type | Description |
|---|---|---|
| nError | SalNumber | |
| sError | SalString& |
Returns: SalBoolean.
GetErrorTextX(error)
Returns the error text corresponding to the error number.
| Parameter | Type | Description |
|---|---|---|
| error | 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, intoList, endOfRS)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| intoList | SalString | |
| endOfRS | 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, errorNumber, errorDescription, sqlState)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| errorNumber | SalNumber& | |
| errorDescription | SalString& | |
| sqlState | SalString& |
Returns: SalBoolean.
Immediate(sqlCommand)
Prepares and executes a SQL statement.
| Parameter | Type | Description |
|---|---|---|
| sqlCommand | SalString |
Returns: SalBoolean.
Immediate(sqlCommand, errorHandler)
Prepares and executes a SQL statement.
| Parameter | Type | Description |
|---|---|---|
| sqlCommand | 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, sqlStatement)
Compiles a SQL statement for execution.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sqlStatement | SalString |
Returns: SalBoolean.
Prepare(hSql, sqlStatement, errorHandler)
Compiles a SQL statement for execution.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sqlStatement | SalString | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
PrepareAndExecute(hSql, sqlStatement)
Compiles and executes a SQL statement.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sqlStatement | SalString |
Returns: SalBoolean.
PrepareAndExecute(hSql, sqlStatement, errorHandler)
Compiles and executes a SQL statement.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sqlStatement | SalString | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
PrepareSP(hSql, storedProc, intoList)
Prepares a stored procedure invocation statement.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| storedProc | SalString | |
| intoList | SalString |
Returns: SalBoolean.
PrepareSP(hSql, storedProc, intoList, errorHandler)
Prepares a stored procedure invocation statement.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| storedProc | SalString | |
| intoList | SalString | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
Retrieve(hSql, name, bindList, intoList)
Retrieves a SQLBase compiled command.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| name | SalString | |
| bindList | SalString | |
| intoList | SalString |
Returns: SalBoolean.
Retrieve(hSql, name, bindList, intoList, errorHandler)
Retrieves a SQLBase compiled command.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| name | SalString | |
| bindList | SalString | |
| intoList | 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, isolation)
Sets the isolation level.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| isolation | SalString | CS=Cursor Stability; RL=Release Locks; RO=Read Only; RR=Read Repeatability |
Returns: SalBoolean.
SetLockTimeout(hSql, timeout)
Specifies the maximum time to wait before generating an error.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| timeout | 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, set)
Turns result set mode on or off for all handles associated with the same connection.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| set | 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.