SQLGetStmtAttr

ODBC and SQL Server

ODBC and SQL Server

SQLGetStmtAttr

The Microsoft® SQL Server™ ODBC driver extends SQLGetStmtAttr to expose driver-specific statement attributes. All driver-specific attributes are SQLINTEGER values.

The SQL Server ODBC driver SQL_TEXTPTR_LOGGING attribute exposes logging of operations on columns containing text or image data.

Value Description
SQL_TL_OFF Logging operations performed on text, ntext, and image data is disabled.
SQL_TL_ON Default. Logging of operations performed on text, ntext, and image data is enabled.

The SQL_SOPT_SS_CURRENT_COMMAND attribute exposes the current command of a command batch. The return is an integer specifying the location of the command in the batch.

SQL_SOPT_SS_HIDDEN_COLUMNS exposes, in the result set, columns hidden in a SQL Server SELECT FOR BROWSE statement. The driver does not expose these columns by default.

Value Description
SQL_HC_OFF Default. FOR BROWSE columns are hidden from the result set.
SQL_HC_ON Exposes FOR BROWSE columns.

SQL_SOPT_SS_NCOUNT_STATUS indicates the current setting of the NOCOUNT option, which controls whether SQL Server reports the numbers of rows affected by a statement when SQLRowCount is called.

Value Description
SQL_NC_OFF NOCOUNT is OFF. SQLRowCount returns number of rows affected.
SQL_NC_ON NOCOUNT is ON. The counts of rows affected is not returned by SQLRowCount.