SqlSetStmtSimulateCursor Function | |
Return and optionally change the default cursor simulation mode used by for SQLSelect objects
Namespace:
VOSQLClasses
Assembly:
VOSQLClasses (in VOSQLClasses.dll) Version: 2.21
Syntax FUNCTION SqlSetStmtSimulateCursor(
nNew
) AS LONG CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static int SqlSetStmtSimulateCursor(
Usual nNew = default
)
Request Example
View SourceParameters
- 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:
Constant | Description |
---|
SQL_SC_NON_UNIQUE | The 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_UNIQUE | The 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_UNIQUE | The 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 See Also