skip to main content
OpenAccess SDK SQL Engine Core Functions API : Function Reference : dam_setInfo
 

dam_setInfo

This function sets the specified global, connection or statement level information for use by the OpenAccess SDK SQL engine. See Table 171 for the types of information that can be set.
int dam_setInfo(
DAM_HDBC hdbc,
DAM_HSTMT hstmt,
int iInfoType,
void * pInfoValue,
int iInfoValueLen)
Table 170. Parameters for dam_setInfo
Parameter
Type
Description
IN
hdbc
DAM_HDBC
The OpenAccess SDK SQL engine connection handle to be used for connection level options. Set to NULL for statement level options.
hstmt
DAM_HSTMT
The statement handle to be used for statement level options. Set to NULL for connection level options.
iInfoType
int
The information to set.
pInfoValue
void *
The pointer to a short integer, integer, char, or void pointer value depending on the type of information set.
iInfoValueLen
int
The size of the input value. For strings, this can be set to XO_NTS for a null terminated string or the number of characters. For all other types, this should be set to the number of bytes.
RETURN
int
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 171. Information Type for dam_setInfo
Information Type
Description
DAM_INFO_ISLOWER_FUNC
Global Option. Used to replace the built-in function to check if a character is lower case. pInfoValue should refer to the function that has the same declaration as islower in the standard C library.
int islower (int) Return non-zero if true.
DAM_INFO_ISUPPER_FUNC
Global Option. Used to replace the built-in function to check if a character is upper case. pInfoValue should refer to the function that has the same declaration as isupper in the standard C library.
int isupper (int) Return non-zero if true.
DAM_INFO_MEMMP_FUNC
Global Option. Used to replace the built-in mem compare function for comparing two blocks of memory. pInfoValue should refer to the function that has the same declaration as memcmp in the standard C library.
int memcmp(const void *buf1,const void *buf2,size_t count);
DAM_INFO_STMT_IP_CONTEXT
Statement level option; used to store a pointer to the 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 input value pInfoValue is set to the address of the variable containing the pointer to the IP defined data structure. The input value iInfoValueLen is set to size of void *.
The functions 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.
DAM_INFO_STRCMP_FUNC
Global Option. Used to replace the built-in string compare function. pInfoValue should refer to the function which has the same declaration as strcmp in the standard C library.
int strcmp (char *,char *)
DAM_INFO_STRICMP_FUNC
Global Option. Used to replace the built-in string compare function for case-insensitive comparison. pInfoValue should refer to the function which has the same declaration as stricmp or strcasecmp in the standard C library.
int stricmp (char *,char *)
DAM_INFO_STRLWR_FUNC
Global Option. Used to replace the built-in function to convert string to lower case. pInfoValue should refer to the function which has the same declaration as strlwr.
char * strlwr(char *)
DAM_INFO_STRNCMP_FUNC
Global Option. Used to replace the built-in string compare function for specified number of characters. pInfoValue should refer to the function which has the same declaration as strncmp in the standard C library.
int strncmp (char *,char *,int)
DAM_INFO_STRNICMP_FUNC
Global Option. Used to replace the built-in string compare function for case-insensitive comparison limited to specified number of characters. pInfoValue should refer to the function which has the same declaration as strnicmp or strncasecmp in the standard C library.
int strnicmp (char *,char *,int)
DAM_INFO_STRUPR_FUNC
Global Option. Used to replace the built-in function to convert string to upper case. pInfoValue should refer to the function which has the same declaration as strupr.
char * strupr(char *)
DAM_INFO_TOLOWER_FUNC
Global Option. Used to replace the built-in function to convert character to lower case. pInfoValue should refer to the function which has the same declaration as tolower.
int tolower(int)
DAM_INFO_TOUPPER_FUNC
Global Option. Used to replace the built-in function to convert character to upper case. pInfoValue should refer to the function which has the same declaration as toupper.
int toupper(int)
DAM_INFO_WISLOWER_FUNC
Option not supported.
DAM_INFO_WISUPPER_FUNC
Option not supported.
DAM_INFO_WMEMMP_FUNC
Global Option. Used to replace the built-in mem compare function for comparing two blocks of memory containing Unicode data. pInfoValue should refer to the function that has the same declaration as wmemcmp in the standard C library.
int wmemcmp(const OAWCHAR * buf1,const OAWCHAR * buf2,size_t count)
DAM_INFO_WSTRCMP_FUNC
Global Option. Used to replace the built-in 16-bit Unicode string compare function. pInfoValue should refer to the function which has the same declaration as wcscoll in the standard C library.
int wcscoll (wchar_t *,wchar_t *)
DAM_INFO_WSTRICMP_FUNC
Global Option. Used to replace the built-in Unicode string compare function for case-insenstitive comparison. pInfoValue should refer to the function which has the same declaration as wcsicmp or wscasecmp in the standard C library.
int wcsicmp (wchar_t *,wchar_t *)
DAM_INFO_WSTRLWR_FUNC
Global Option. Used to replace the built-in Unicode function to convert string to lower case. pInfoValue should refer to the function which has same the declaration as wcslwr.
wchar_t * wcslwr(wchar_t *)
DAM_INFO_WSTRNCMP_FUNC
Global Option. Used to replace the built-in Unicode string compare function for specified number of characters. pInfoValue should refer to the function which has the same declaration as wcsncmp in the standard C library.
int wcsncmp (wchar_t *,wchar_t *,int)
DAM_INFO_WSTRNICMP_FUNC
Global Option. Used to replace the built-in Unicode string compare function for case-insenstitive comparison limited to specified number of characters. pInfoValue should refer to the function which has the same declaration as wcsnicmp or wsncasecmp in the standard C library.
int wcsnicmp (wchar_w *,wchar_t *,int)
DAM_INFO_WSTRUPR_FUNC
Global Option. Used to replace the built-in Unicode function to convert string to upper case. pInfoValue should refer to the function which has same the declaration as wcsupr.
wchar_t * wcsupr(wchar_t *)
DAM_INFO_WTOLOWER_FUNC
Global Option. Used to replace the built-in Unicode function to convert character to lower case. pInfoValue should refer to the function which has the same declaration as towlower.
int towlower(wint_t)
DAM_INFO_WTOUPPER_FUNC
Global Option. Used to replace the built-in Unicode function to convert character to upper case. pInfoValue should refer to the function which has the same declaration as towupper.
int towupper(wint_t)

See also

*dam_getInfo
*dam_setInfo
*dam_getIP_hstmt
*dam_setIP_hstmt