sqleqryi API - Query client information
If a specific connection is requested, the sqleqryi API returns the latest values for that connection. If all connections are specified, the sqleqryi API returns the values that are to be associated with all connections; that is, the values passed in the last call to the sqleseti API (specifying all connections).
The sqleqryi API does not send a request to the database server to retrieve the current client information registry values. The sqleqryi API returns client information registry values from the client side, which are set when client information registry values are explicitly set. For example, you can use the sqleseti API to set the client information registry values and the sqleqryi API returns the values that are specified with the sqleseti API. Therefore, the sqleqryi API cannot return the client information registry values that are set by calling the WLM_SET_CLIENT_INFO procedure.
Authorization
None
Required connection
None
API include file
sqlenv.hAPI and data structure syntax
SQL_API_RC SQL_API_FN
sqleqryi (
unsigned short DbAliasLen,
char * pDbAlias,
unsigned short NumItems,
struct sqle_client_info* pClient_Info,
struct sqlca * pSqlca);sqleqryi 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.
- pSqlca
- Output. A pointer to the sqlca structure.
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 the sqleseti API.
- The enableDefaultClientInfo IBM® data server driver configuration keyword is set to True.
- For the CURRENT CLIENT_WRKSTNNAME register, your CLI application set the ClientWrkStnName keyword in the db2cli.ini file or the ClientWorkstationName IBM data server driver configuration keyword to 'NODEFAULT'.
- For all client information registers other than the CURRENT CLIENT_WRKSTNNAME register, your CLI application has not explicitly set the client information registry value.