Skip to content

SQLGetStmtAttribute - cSQLStatement

Gets the value of an embedded SQL Statement attribute

Type: Function
Return Data Type: String

Parameters

Parameter Type Description
iAttribId Integer Statement attribute to get

Syntax

Function SQLGetStmtAttribute Integer iAttribId Returns String

Call Example

Get SQLGetStmtAttribute iAttribId to StringVariable

Description

Gets the value of an embedded SQL Statement attribute. The attribute must be get from an opened (with SQLOpen) embedded SQL statement handle.

Attribute Description Constant Meaning Constant Meaning
SQLSTMTATTRIB_COLUMNCOUNT The number of columns in the result set of the statement.
SQLSTMTATTRIB_ROWCOUNT The number of rows in the result of the statement. For update, delete or insert statement this attribute returns the number of rows affected by the statement.
SQLSTMTATTRIB_ROWCOUNT_TYPE The accuracy of the rowcount attribute. This attribute can be:ConstantMeaning
1 The rowcount returns the exact number of rows
0 The rowcount does not return a meaningful value
-1 The rowcount is approximate
SQLSTMTATTRIB_NUMMESSAGES The number of informational messages of the statement. You can get the messages by calling SQLGetMessage.
SQLSTMTATTRIB_CURSOR_TYPE The type of cursor used in the statement. This attribute can be:ConstantMeaning
SQL_CURSOR_FORWARD_ONLY CursorForward Only (default)
SQL_CURSOR_DYNAMIC Cursor Dynamic
SQL_CURSOR_STATIC Cursor Static
SQL_CURSOR_KEYSET_DRIVEN Cursor Keyset Driv

See Also

SQLSetStmtAttribute

Return Value

The value of the embedded SQL Statement attribute.