The following table lists the Statement Options in SQLSetStmtAttr().
If Redrive is turned on for a session, it can be turned off for a particular statement. If redrive is turned OFF at the session level it cannot be turned ON for a statement.
SQL_ATTR_REDRIVE (13014) statement attribute can take
SQL_REDRIVE_OFF (0) and SQL_REDRIVE_ON (1) values.
|SQL_BIND_TYPE||Only supports SQL_BIND_BY_COLUMN|
|SQL_CONCURRENCY||Only supports SQL CONCUR_READ_ONLY|
|SQL_ATTR_CONNECTION_POOLING||Supports SQL_CP_PER_DRIVER, SQL_CP_ONE_PER_HENV, and SQL_CP_OFF|
|SQL_CURSOR_TYPE||Only supports SQL_CURSOR_FORWARD_ONLY|
|SQL_KEYSET_SIZE||Only supports SQL_KEYSET_SIZE=0|
SQL_MAX_ROWS confines the results returned to a user-specified limit. This is implemented on a per SELECT statement basis and as such, might not reduce the network traffic for multi-statement requests due to the Teradata mechanism used for spool control.
In multi-statement requests, network traffic cannot be avoided since the current result set must be scrolled through to get to the next.
In single-statement requests or if within the last statement of a multi-statement request, canceling the request reduces network traffic.
Reduce network traffic by fetching only the needed result rows of data. If all of the results from a single-statement request or from the last statement of a multi-statement request are not needed, calling SQLFreeSTMT(SQL_CLOSE) discards all pending results.
The implementation of SQL_NOSCAN varies slightly from the ODBC definition. By default, requests are scanned (parsed) to convert ODBC SQL syntax to Teradata SQL syntax.
If an application calls SQLSetStmtOption(hstmt, SQL_NOSCAN, SQL_NOSCAN_ON), ODBC Driver for Teradata does not parse SQL requests. The ODBC SDK mentions that only ODBC escape clauses are not scanned when SQL_NOSCAN_ON is set.
For custom ODBC applications that generate only Teradata-specific SQL, set SQL_NOSCAN_ON to avoid parsing SQL requests and to improve performance.
|SQL_RETRIEVE_DATA||Only supports SQL_RD_ON|
|SQL_ROWSET_SIZE||Only supports SQL_ROWSET_SIZE=1|
|SQL_SIMULATE_CURSOR||Only supports SQL_SC_NON_UNIQUE|