skip to main content
OpenAccess SDK SQL Engine core methods for Java : Exchanging data : dam_setInfo
 

dam_setInfo

This method sets the specified global, connection or statement level information to be used by the OpenAccess SDK SQL engine. See Table 234 for the types of information that can be set.
int dam_setInfo(
    long   hdbc,
    long   hstmt,
    int    iInfoType,
    String pStrInfoValue,
    int    intVal)
Table 233. Parameters for dam_setInfo
Parameter
Type
Description
INPUT
hdbc
long
The OpenAccess SDK SQL engine connection handle to be used for connection level options. Set to 0 for statement level options.
hstmt
long
The statement handle to be used for statement level options. Set to 0 for connection level options.
iInfoType
int
The information to set. See Table 234.
pInfoValue
String
String type options are passed in through this argument.
intVal
int
Integer type options are passed in through this argument.
RETURN
int
The status of the call:
DAM_SUCCESS - set the iInfoType value.
DAM_FAILURE - wrong value for iInfoType or the input buffer is not large enough.
Table 234. Information Type for dam_setInfo
Information Type
Description
DAM_INFO_STMT_IP_CONTEXT
Statement level option; used to store a key to IP defined data structure that needs to persist across all queries executed to handle the requested query.
This value can be retrieved using the dam_getInfo. Joins and sub-queries are examples where the IP is called multiple times to execute a given query.
The key input value pInfoValue is stored as an integer. The input value iInfoValueLen is set to size of void *.
The methods dam_setIP_hstmt and dam_getIP_hstmt are used to reference IP-defined data structures for a sub-query on a specific table.
Use dam_setInfo and dam_getInfo to store IP-specific information that is accessible during the execution of any of the involved tables.
Table 235. Parameters for dam_getValueToSet
Parameter
Type
Description
INPUT
hRowElem
long
Value set handle.
iXoType
int
The data type in which to get the value.
OUTPUT
piStatus
xo_int
The status of the method call:
DAM_SUCCESS - all data retrieved.
DAM_SUCCESS_WITH_RESULT_PENDING - more data is available and should be retrieved by calling this method again. This will occur for a large LONGVARBINARY data.
DAM_FAILURE - error in getting the data. Most likely the data cannot be converted to the XO_Type asked for.
RETURN
Object
The data object. The java type of the data will correspond to the iXoType value. See Table 34. A NULL Object is returned if the underlying value is NULL data.

See also

*dam_getInfo
*dam_getIP_hstmt
*dam_getNextValueSet
*dam_setInfo
*dam_setIP_hstmt