ODBC_SQLSetStmtAttr

4D - Documentation   Français   English   German   4D ODBC PRO, Command Theme List   4D ODBC PRO, Command Alphabetical List   Back   Previous   Next

version 2004


ODBC_SQLSetStmtAttr (stmtID; attribute; valuePtr) Longint

ParameterTypeDescription
stmtIDLongintStatement ID
attributeLongintAttribute to set
valuePtrPointerPointer to the value to set the attribute
Function resultLongintReturns the result of the MS ODBC API function
SQLSetStmtAttr

Description

The ODBC_SQLSetStmtAttr command sets attribute related to a statement.

stmtID is a valid statement ID returned by ODBC_SQLAllocStmt.

attribute is a statement attribute to set and can be one of the following values:

ConstantDescription
SQL_ATTR_APP_PARAM_DESC
SQL_ATTR_APP_ROW_DESC
SQL_ATTR_ASYNC_ENABLESpecifies whether a function called with the
specified statement is executed asynchronously
SQL_ATTR_CONCURRENCYSpecifies the cursor concurrency
SQL_ATTR_CURSOR_SCROLLABLEScrollable cursors are either required or not
required for the specified statement
SQL_ATTR_CURSOR_SENSITIVITYSpecifies whether cursors for the specified
statement handle make visible the changes
made to a result set by another cursor
SQL_ATTR_CURSOR_TYPESpecifies cursor type, like scrolls forward, static,
saves and uses the keys for the number of
specified rows specified or only those in the
rowset
SQL_ATTR_ENABLE_AUTO_IPDSQL_TRUE = Turns on automatic population of
the IPD after a call to ODBC_SQLPrepare.
SQL_FALSE = Turns off automatic population of
the IPD after a call to ODBC_SQLPrepare.
SQL_ATTR_FETCH_BOOKMARK_PTRBookmark value
SQL_ATTR_IMP_PARAM_DESCThe value of this attribute is the descriptor
allocated when the statement was initially
allocated.
SQL_ATTR_IMP_ROW_DESCThe value of this attribute is the descriptor
allocated when the statement was initially
allocated.
SQL_ATTR_KEYSET_SIZENumber of rows in the keyset for a keyset-
driven cursor
SQL_ATTR_MAX_LENGTHMaximum amount of data that the driver
returns from a character or binary column.
SQL_ATTR_MAX_ROWSMaximum number of rows to return to the
application for a SELECT statement.
SQL_ATTR_METADATA_IDDetermines how the string arguments of catalog
functions are treated.
SQL_ATTR_NOSCANIndicates whether the driver should scan SQL
strings for escape sequences.
SQL_ATTR_PARAM_BIND_OFFSET_PTRBind offset.
SQL_ATTR_PARAM_BIND_TYPEIndicates the binding orientation to be used for
dynamic parameters.
SQL_ATTR_PARAM_OPERATION_PTRIndicates if a parameter is to be ignored during
execution of an SQL statement.
SQL_ATTR_PARAM_STATUS_PTRStatus information for each row of parameter
values.
SQL_ATTR_PARAMS_PROCESSED_PTRNumber of sets of parameters that have been
processed, including error sets.
SQL_ATTR_PARAMSET_SIZESpecifies the number of values for each parameter.
SQL_ATTR_QUERY_TIMEOUTNumber of seconds to wait for an SQL
statement to execute.
SQL_ATTR_RETRIEVE_DATAEither retrieve or do not retrieve data after it
positions the cursor to the specified location.
SQL_ATTR_ROW_ARRAY_SIZENumber of rows returned by each call to
ODBC_SQLFetch or ODBC_SQLFetchScroll
SQL_ATTR_ROW_BIND_OFFSET_PTRAn offset to change binding of column data.
SQL_ATTR_ROW_BIND_TYPEThe binding orientation to be used when
ODBC_SQLFetch or ODBC_SQLFetchScroll is
called on the specified statement.
SQL_ATTR_ROW_NUMBERNumber of the current row in the entire result set.
SQL_ATTR_ROW_OPERATION_PTRValues used to ignore a row during a bulk
operation using ODBC_SQLSetPos.
SQL_ATTR_ROW_STATUS_PTRRow status values after a call to ODBC_SQLFetch
or ODBC_SQLFetchScroll.
SQL_ATTR_ROWS_FETCHED_PTRNumber of rows fetched after a call to
ODBC_SQLFetch or ODBC_SQLFetchScroll.
SQL_ATTR_SIMULATE_CURSORSpecifies whether drivers that simulate
positioned update and delete statements
guarantee that such statements affect only one
single row.
SQL_ATTR_USE_BOOKMARKSSpecifies whether an application will use
bookmarks with a cursor.

valuePtr is a pointer to a variable containing the value at which to set the attribute parameter.

For more information, please see the SQLSetStmtAttr function in the MS ODBC API at http://msdn.microsoft.com/library/en-us/odbc/htm/odbcsqlsetstmtattr.asp.

Function Results

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

Example

See the example for the ODBC_SQLBulkOperations command.

See Also

ODBC_SQLBulkOperations, ODBC_SQLGetStmtAttr.


4D - Documentation   Français   English   German   4D ODBC PRO, Command Theme List   4D ODBC PRO, Command Alphabetical List   Back   Previous   Next