short GetServerAttributes(BSTR bstrServerName, VARIANT* pvaAttributes)
Description
This function retrieves configuration parameters for a server defined in the current server definition file (SDF). It can be called for any server defined in the SDF, at any time, including prior to calling InitializeServer(). However, some of the attributes may not be available if InitializeServer() has not been called for the specified server during the current session.
Parameters
Name | Description |
---|---|
bstrServerName | The name of the server for which configuration parameters should be returned. This name must match one of the names defined in the current SDF. Use the GetServerList() or GetServerListEx()) functions to retrieve a list of valid server names. |
PvaAttributes | A pointer to a VARIANT in which the configuration parameters are stored. The parameters are returned as an array of keyword/value string pairs (variant type VT_ARRAY | VT_BSTR, with two dimensions, the outer dimension being the number of parameters returned and the inner dimension being two). |
The keywords that may be returned and their corresponding values are:
Keyword | Value |
---|---|
GENERAL_NAME | The name of the server. |
SECURITY_USER_ID_ PASSWORD_REQUIRED | "Y" if security information is required for the server, "N" otherwise. |
SECURITY_PASSWORD_ CAN_BE_CHANGED | "Y" if users can change their passwords at the server, "N" otherwise |
SECURITY_ ENCRYPTION | The type of encryption performed when accessing the server: "0" - none "1" - encrypted password "2" - encrypted user ID and password "3" - encrypted user ID and data "4" - encrypted user ID, password, and data |
CONNECTION_TYPE | The type of connection used when accessing the server: "0" - DRDA over TCP/IP "1" - DRDA over SNA "2" - CLI "3" - ODBC |
CONNECTION_ HOST_NAME | The TCP/IP host name used when connecting to the server (only for DRDA over TCP/IP connections). |
CONNECTION_ PORT_NUMBER | The TCP/IP port number used when connecting to the server (only for DRDA over TCP/IP connections). |
CONNECTION_ RDB_NAME | The RDB name used when connecting to the server (only for DRDA over TCP/IP or DRDA over SNA connections). |
CONNECTION_ ANSI_CLIENT_CCSID | The CCSID used when connecting to the server from the ANSI version of QMF for Windows (only for DRDA over TCP/IP or DRDA over SNA connections). |
CONNECTION_ UNICODE_CLIENT_ CCSID | The CCSID used when connecting to the server from the Unicode version of QMF for Windows (only for DRDA over TCP/IP or DRDA over SNA connections). |
CONNECTION_ ENABLE_LOAD_ BALANCING | "Y" if DRDA load balancing should be enabled, "N" otherwise (only for DRDA over TCP/IP or DRDA over SNA connections). |
CONNECTION_ SYMDESTNAME | The CPI-C symbolic destination name used when connecting to the server (only for DRDA over SNA connections). |
CONNECTION_ DATABASE_ALIAS | The DB2 CLI database alias used when connecting to the server (only for CLI connections). |
CONNECTION_ CONNECTION_STRING | The DB2 CLI or ODBC connection string used when connecting to the server (only for CLI or ODBC connections). |
CONNECTION_ FILE_DSN | The ODBC file data source name used when connecting to the server (only for ODBC connections using a file DSN). |
CONNECTION_ MACHINE_DSN | The ODBC data source name used when connecting to the server (only for ODBC connections using a machine DSN). |
PACKAGES_ DECIMAL_DELIMITER | The decimal delimiter string used when accessing the server. |
PACKAGES_ STRING_DELIMITER | The string delimiter string used when accessing the server. |
PACKAGES_ IDENTIFIER_DELIMITER | The identifier delimiter string used when accessing the server. |
CATALOG_USED | "Y" if a QMF catalog is used when accessing the server, "N" otherwise. |
CATALOG_SERVER | The name of the server hosting the QMF catalog used when accessing the server (only if a catalog is used). |
CATALOG_ID | The ID of the QMF catalog at the catalog server used when accessing the server (only if a catalog is used). |
WEBSPHERE_ JDBC_DRIVER | The JDBC driver class name used when accessing the server from QMF for WebSphere. |
WEBSPHERE_ JDBC_URL | The JDBC URL used when accessing the server from QMF for WebSphere. |
WEBSPHERE_ CONNECTION_STRING | The JDBC connection string used when connecting to the server from QMF for WebSphere. |
Return Value
The return value will be zero (0) if successful or non-zero if unsuccessful.
If the return value is non-zero, you can call GetLastErrorString(), or GetLastErrorType() to get additional error information.
Related Tasks