skip to main content
IP API Reference for C/C++ : IP API for C/C++ : OASQLIP_get_stmt_info
 

OASQLIP_get_stmt_info

This function is called by the OpenAccess SDK layer to request statement level information from the IP.
int OASQLIP_get_stmt_info(
SQLIP_HSTMT sqlip_hstmt,
OADS_INTEGER iInfoType,
OADS_POINTER CharValuePtr,
OADS_UINTEGER iBufferLen,
OADS_INTEGER * piInfoValueLen,
int64 * NumericValuePtr)
 
Table 35: Parameters for OASQLIP_get_stmt_info 
Parameter
Type
Description
INPUT
 
 
sqlip_hstmt
SQLIP_HSTMT
Statement handle.
iInfoType
OADS_INTEGER
Option – see Table 36.
iBufferLen
OADS_UINTEGER
Size of the buffer pointed to by CharValuePointer
OUTPUT
 
 
CharValuePtr
OADS_POINTER
Buffer to return the string data into.
piInfoValueLen
OADS_INTEGER *
Buffer to return the length of the string data written into CharValuePtr. Return the length as number of bytes written to CharValuePtr.
NumericValuePtr
int64 *
Buffer in which to return integer values.
RETURN
 
 
 
int
OADS_SUCCESS – if the requested option is supported.
OADS_ERROR – An error occurred in obtaining the requested information.
OADS_NOT_AVAILABLE - if the requested option is not supported.
The following table describes the options used by the OASQLIP_get_stmt_info function.
 
Table 36: get_info Options
iInfoType
Description
OADS_STMT_INFO_NEXT_RESULT_SET_ AVAILABLE (1)
Checks if more result sets are available for the current statement.
Returns an integer value of 1 if more result sets are available, otherwise, returns 0. Returning a 1 results in the OASQLIP_open_next_cursor method being called.
OADS_STMT_INFO_OUTPUT_RESULT_SET_ AVAILABLE (2)
Reports whether the current statement had a return code and/or output parameters. Returns an integer value of 1 if yes, otherwise return 0. Returning a 1 results in the OASQLIP_open_output_cursor being called.
OADS_STMT_INFO_QUERY_TIMEOUT (3)
Return the query time out setting in seconds. Return an integer value.
OADS_STMT_INFO_MAX_ROWS (5)
Return the maximum number of rows setting. Return an int64 value.