Scalable Database Server, HiRDB Version 8 UAP Development Guide

[Contents][Index][Back][Next]

17.7.1 setDescription

(a) Function

Sets the additional connection information needed for connection to the database.

(b) Format
 
public void setDescription ( String description ) throws SQLException
 
(c) Arguments

String description
Specifies additional connection information. If the null value is specified, the current additional connection information that had been set by this method is invalidated and the settings are returned to their initial status.
(d) Return value

None.

(e) Functional detail

The following table shows the additional connection information that can be set with this method.

Setting Setting details Setting required?
HiRDB port number Sets the HiRDB port number, as a character string.
For details about the priorities among the setting methods for the HiRDB port number, see 17.11 Connection information priorities.
Optional
Environment variable group name of HiRDB client Sets the environment variable group name of the HiRDB client. The name is expressed as an absolute path name that follows @HIRDBENVGRP=. Note the following points:
  • If no value is set following the equal sign, as in @HIRDBENVGRP=,, the JDBC driver assumes that there is no specification for this item.
  • The environment variable group name is case sensitive. Also, the environment variable group name depends on the OS.
  • If the environment variable group name contains a single-byte space or a single-byte at mark (@), you must enclose the name in single-byte double quotation marks ("). When an environment variable group name is enclosed in single-byte double quotation marks, any characters following the concluding single-byte double quotation mark through the end of the character string are ignored. An environment variable group name containing a single-byte double quotation mark or a single-byte comma cannot be specified.
  • For Windows, an environment variable group name that was specified with the HiRDB client environment variable registration tool cannot be specified.
Optional
HiRDB environment variable group identifier Sets the HiRDB environment variable group identifier, as four alphanumeric characters. Required during XA connection

Note 1:
Specification examples are shown below. In these examples ds represents the name of a variable that has reference to the PrdbDataSource class's instance. [Figure] represents a single-byte space character.
Example 1: When specifying the HiRDB port number
 
ds.setDescription ("22200");
 
Example 2: When the path of the environment variable group name is C:\HiRDB_P\Client\HiRDB.ini
 
ds.setDescription ("@HIRDBENVGRP=C:\\HiRDB_P\\Client\\HiRDB.ini");
 
Example 3: When the path of the environment variable group name is C:\Program[Figure]Files\HITACHI\HiRDB\HiRDB.ini
 
ds.setDescription ("@HIRDBENVGRP=\"C:\\Program[Figure]Files\\HITACHI\\HiRDB\HiRDB.ini\"");
 
Example 4: When the path of the environment variable group name is /HiRDB_P/Client/HiRDB.ini
 
ds.setDescription ("@HIRDBENVGRP=/HiRDB_P/Client/HiRDB.ini");
 
Example 5: When a HiRDB environment variable group identifier is specified during an XA connection
 
ds.setDescription ("HDB1");ds.setXAOpenString ("HDB1+C:\\Program[Figure]Files\\HITACHI\\HiRDB\\HiRDB.ini");
 

Note 2:
Do not include single-byte spaces in an environment variable group name. Examples of specification errors are shown below:
 
@[Figure]HIRDBENVGRP=/HiRDB_P/Client/HiRDB.ini
@HIRDBENVGRP[Figure]=/HiRDB_P/Client/HiRDB.ini
@HIRDBENVGRP=[Figure]/HiRDB_P/Client/HiRDB.ini
@HIRDBENVGRP=/HiRDB_P/Client/HiRDB.ini[Figure]
 
Note: [Figure] represents a single-byte space character.
(f) Exceptions

When an environment variable group name begins with a single-byte at mark (@) and the information specified following the at mark includes a single-byte space, this method throws an SQLException.