Click or drag to resize

SqlSetStmtSimulateCursor Function

X#

Note: This API is now obsolete.

Return and optionally change the default cursor simulation mode used by for SQLSelect objects

Namespace:  XSharp_VOSQLClasses
Assembly:  XSharp.VOSQLClasses (in XSharp.VOSQLClasses.dll) Version: 2.19
Syntax
[ObsoleteAttribute]
 FUNCTION SqlSetStmtSimulateCursor(
	nNew
) AS LONG CLIPPER
Request Example View Source

Parameters

nNew (Optional)
Type: Usual
The default cursor simulation mode that will be used by new SqlSelect objects

Return Value

Type: Long
If nNew is not specified, SQLSetStmtSimulateCursor() returns the current setting. If nNew is specified, the new setting is returned.
Remarks
The cursor simulation mode for SQLSelect objects is used to determine if rows have been changed by other connections. The possible values are:
ConstantDescription
SQL_SC_NON_UNIQUEThe driver does not guarantee that simulated positioned update or delete statements will affect only one row; it is the application's responsibility to do so. If a statement affects more than one row, SQLExecute, SQLExecDirect, or SQLSetPos returns SQLSTATE 01001 (Cursor operation conflict).
SQL_SC_TRY_UNIQUEThe driver attempts to guarantee that simulated positioned update or delete statements affect only one row. The driver always executes such statements, even if they might affect more than one row, such as when there is no unique key. If a statement affects more than one row, SQLExecute, SQLExecDirect, or SQLSetPos returns SQLSTATE 01001 (Cursor operation conflict).
SQL_SC_UNIQUEThe driver guarantees that simulated positioned update or delete statements affect only one row. If the driver cannot guarantee this for a given statement, SQLExecDirect or SQLPrepare returns an error.
The default value used by X# is SQL_SC_TRY_UNIQUE
Examples