4D v13

ODBC_SQLGetStmtAttr

Home

 
4D v13
ODBC_SQLGetStmtAttr

ODBC_SQLGetStmtAttr 


 

ODBC_SQLGetStmtAttr ( stmtID ; attribute ; valuePtr ) -> Function result 
Parameter Type   Description
stmtID  Longint in Statement ID
attribute  Longint in Attribute to retrieve
valuePtr  Pointer in Pointer to the current value of the attribute
Function result  Longint in Returns the result of the MS ODBC API function SQLGetStmtAttr

The ODBC_SQLGetStmtAttr command returns the current setting of a statement attribute.

stmtID is a valid statement ID returned by ODBC_SQLAllocStmt.

attribute is the statement attribute to retrieve 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 that will contain the current value of attribute.

For more information, please see the SQLGetStmtAttr function in the MS ODBC API Reference at http://msdn.microsoft.com/en-us/library/ms715438(VS.85).aspx.

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

Example  

The following method sets a statement attribute and then retrieves it:

 vAttributeVal:=SQL_CURSOR_KEYSET_DRIVEN
 $result:=ODBC_SQLSetStmtAttr($newStmt;SQL_ATTR_CURSOR_TYPE;->vAttributeVal)
 $result:=ODBC_SQLGetStmtAttr($newStmt;SQL_ATTR_CURSOR_TYPE;->vNewAttributeValue)

 
PROPERTIES 

Product: 4D
Theme: ODBC_Driver attributes
Number: 16982

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D ODBC Pro 2004

 
SEE ALSO 

ODBC_SQLSetStmtAttr