Returns existing client information
by populating the fields in the sqle_client_info data
structure.
Since this API permits specification of a database
alias, an application can query client information associated with
a specific connection. Returns null if the sqleseti API
has not previously established a value.
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.
API 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.
You can obtain the default client information registry
values that are set on the
DB2® for z/OS® server
when the following conditions are met:
- 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.