IBM Books

Administrative API Reference

sqleqryi - Query Client Information

Returns existing client information. Since this API permits specification of a database alias, an application can query client information associated with a specific connection. Returns null if sqleseti - Set Client Information has not previously established a value.

If a specific connection is requested, this API returns the latest values for that connection. If all connections are specified, the API returns the values that are to be associated with all connections; that is, the values passed in the last call to sqleseti (specifying all connections).

Authorization

None

Required Connection

None

Version

sqlenv.h

C API Syntax



/* File: sqlenv.h */
/* API: Query Client Information */
/* ... */
SQL_API_RC SQL_API_FN
  sqleqryi (
    unsigned short DbAliasLen,
    char * pDbAlias,
    unsigned short NumItems,
    struct sqle_client_info* pClient_Info,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlenv.h */
/* API: Query Client Information */
/* ... */
SQL_API_RC SQL_API_FN
  sqleqryi (
    unsigned short DbAliasLen,
    char * pDbAlias,
    unsigned short NumItems,
    struct sqle_client_info* pClient_Info,
    struct sqlca * pSqlca);
/* ... */
 

API Parameters

DbAliasLen
Input. A 2-byte unsigned integer representing the length in bytes of the database alias. If a value greater than zero is provided, pDbAlias must point to the alias name. Returns the settings associated with the last call to sqleseti for this alias (or a call to sqleseti specifying a zero length alias). If zero is specified, returns the settings associated with the last call to sqleseti which specified a zero length alias.

pDbAlias
Input. A pointer to a string containing the database alias.

NumItems
Input. Number of entries being modified. The minimum value is 1.

pClient_Info
Input. A pointer to an array of NumItems sqle_client_info structures, each containing a type field indicating which value to return, and a pointer to the returned value. The area pointed to must be large enough to accommodate the value being requested. For more information about this structure, see SQLE-CLIENT-INFO.

pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

Sample Programs

C
\sqllib\samples\c\cli_info.c

Usage Notes

The settings can be queried at any time during execution. If the API call is successful, the current settings are returned to the specified areas. Returns a length of zero and a null-terminated string (\0) for any fields that have not been set through a call to sqleseti - Set Client Information.

See Also

sqleseti - Set Client Information.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]