16.11.1 setDescription

(a) Function

Sets the additional connection information needed by the database to be connected.

(b) Format

public void setDescription (String description)

(c) Argument
String description
Specifies additional connection information.
(d) Return value

None.

(e) Functional detail

Sets the additional connection information needed by the database to be connected. Setting details and whether setting is required are shown as follows.

SettingSetting detailsSetting required?
HiRDB port numberSets the HiRDB port number expressed as a character string.Optional
HiRDB environment variable group nameSets the HiRDB environment variable group name following @HIRDBENVGRP=, expressed as a character string. If the environment variable name contains single-byte spaces or single-byte @ characters, enclose the name in single-byte quotation marks ("). When an environment variable group name is enclosed in single-byte quotation marks, all characters following the last single-byte quotation mark through the end of the character string are ignored. An environment variable group name containing single-byte quotation marks or single-byte commas cannot be specified.Optional
HiRDB environment variable group identifierSets the HiRDB environment variable group identifier expressed as four alphanumeric characters.Required during XA connection
Note 1
The environment variables registered in an environment variable group have precedence over the user environment variables and the environment variables registered by HiRDB.INI.
Note 2
Specification examples are shown below. In these examples, ds represents the name of a variable that has reference to the JdbhDataSource class's instance.
In UNIX:
Example 1: When the path of the HiRDB environment variable group name is /HiRDB_P/Client/HiRDB.ini

ds.setDescription("@HIRDBENVGRP=/HiRDB_P/Client/HiRDB.ini");

In Windows
Example 1: When specifying the HiRDB port number

ds.setDescription("22200");

Example 2: When specifying the environment variable group name HiRDB_ENV_GROUP that has been registered using the tool for registering HiRDB client environment variables

ds.setDescription("@HIRDBENVGRP=HiRDB_ENV_GROUP");

Example 3: When the path of the HiRDB environment variable group name is C:\HiRDB_P\Client\HiRDB.ini

ds.setDescription("@HIRDBENVGRP=C:\\HiRDB_P\\Client\\HiRDB.ini");

Example 4: When the path of the HiRDB environment variable group name is C:\Program[Figure]Files\HITACHI\HiRDB\HiRDB.ini ([Figure]: single-byte space)

ds.setDescription("@HIRDBENVGRP=\"C:\\Program[Figure]Files\\HITACHI\\HiRDB\HiRDB.ini\"");

Example 5: When the HiRDB environment variable group identifier is HDB1

ds.setDescription("HDB1");

(f) Exception that occurs

If an environment variable group name beginning with @ is specified during a connection other than the XA connection, and the specified information following @ contains a single-byte space, this method throws an SQLException.