Scalable Database Server, HiRDB Version 8 UAP Development Guide

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

11.6.1 Notes about using a distributed client

Organization of this subsection
(1) Synchronous update operation on remote and local databases is not supported
(2) Space character conversion

(1) Synchronous update operation on remote and local databases is not supported

If a communications error occurs during COMMIT processing for updating a remote database, it cannot be determined solely on the basis of information provided by the distributed client whether or not the distributed server has completed its COMMIT processing or performed a rollback. In such a case, the user must check the server's status.

When a remote database is updated, it is important that a local database not be updated within the same transaction. If a remote database and a local database are both updated and the COMMIT processing fails, the local database reverts to its status at the preceding synchronization point but the remote database is updated. When only the remote database becomes updated, it may be difficult to restore it to the status at the synchronization point.

(2) Space character conversion

(a) Data substitution and comparison

During data substitution or comparison, the system ignores the pd_space_level operand in the system common definitions and the value of PDSPACELVL in the client environment definition specified with the distributed client's HiRDB.

The space conversion level specified at the distributed server takes effect (that is, the value of the pd_space_level operand in the system common definitions if the distributed server is HiRDB and the value of KEIS CODE SPACE LEVEL in the RD environment definitions if the distributed server is XDM/RD). If necessary, specify the space conversion level at the distributed server.

(b) Data retrieval

Space conversion is not executed at the distributed client.

If a space conversion level is specified at the distributed server, the retrieval result depends on the distributed server's specifications. Table 11-15 shows the space conversion to be executed when the distributed server is HiRDB.

Table 11-15 Space conversion when the distributed server is HiRDB

Distributed server Data type of column to be accessed
DBMS Space conversion level NCHAR, NVARCHAR MCHAR, MVARCHAR CHAR, VARCHAR
HiRDB 1 [Figure]1 [Figure]2 [Figure]
3 Y3 [Figure]2 [Figure]

Legend:
Y: Space conversion is executed when data is fetched.
[Figure]: Space conversion is not executed when data is fetched.

1 If space conversion is executed when data is stored, two consecutive single-byte spaces are converted to a single double-byte space. If the same space conversion level is specified when data is stored as for data retrieval, all spaces in the resulting retrieval data become double-byte spaces.

2 If space conversion is executed when data is stored, each double-byte space is converted to two consecutive single-byte spaces. If the same space conversion level is specified when data is stored as for data retrieval, all spaces in the resulting retrieval data become single-byte spaces.

3 A single double-byte space is converted to two consecutive single-byte spaces during data retrieval; therefore, all spaces in the resulting retrieval data become single-byte spaces.

The distributed client's HiRDB converts each double-byte space to two consecutive single-byte spaces in the resulting retrieval data. This applies not only to the data types NCHAR and NVARCHAR but also to MCHAR, MVARCHAR, CHAR, and VARCHAR. Therefore, all the spaces in the resulting retrieval data to be returned to the UAP become single-byte spaces.