SQLSetStmtAttribute - cSQLStatement
Sets a statement attribute for an embedded SQL statement
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| iAttribId | Integer | Statement attribute to set |
| sAttribValue | String | Attribute value |
Syntax
Procedure SQLSetStmtAttribute Integer iAttribId String sAttribValue
Call Example
Send SQLSetStmtAttribute iAttribId sAttribValue
Description
Sets an embedded SQL Statement attribute. The attribute must be set on an opened (with SQLOpen) embedded SQL statement handle.
The following statement attributes can be set: SQLSTMTATTRIB_CURSOR_TYPE
Valid Values
| Constant | Meaning |
|---|---|
| SQL_CURSOR_FORWARD_ONLY | CursorForward Only (default) |
| SQL_CURSOR_DYNAMIC | Cursor Dynamic |
| SQL_CURSOR_STATIC | Cursor Static |
| SQL_CURSOR_KEYSET_DRIVEN | Cursor Keyset Driven |
Sample
Get SQLOpen of hDbc to hStmt
If (hStmt <> 0) Begin
Send SQLSetStmtAttribute of hstmt SQLSTMTATTRIB_CURSOR_TYPE SQL_CURSOR_STATIC
End
See Also