Nonstop Database, HiRDB Version 9 UAP Development Guide
When an execution request is sent to the server, the data length set in the SQL descriptor area for an output variable used in single-line searches, and in the OUT parameters of CALL statements when an execution request is sent to the server, differs depending on the initial value of the output variable. The following table lists the initial value and the data length set in the SQL descriptor area for each data type.
Table 19-5 Initial value for each data type and the data length set in SQL Descriptor Area
Data type | Initial value | Length of data set in SQL Descriptor Area |
---|---|---|
HiRDBCHAR | variable = null; | 30,000 bytes |
variable = new HiRDBCHAR(int n); | n bytes (1 |
|
variable = new HiRDBCHAR(String t); | Length of t (length of byte array obtained with t.getBytes()) | |
HiRDBVARCHAR | variable = null; | 32,000 bytes |
variable = new HiRDBVARCHAR(int n); | n bytes (1 |
|
variable = new HiRDBVARCHAR(String t) | Length of t (length of byte array obtained with t.getBytes()) | |
HiRDBNCHAR | variable = null; | 30,000 bytes (15,000 double-byte characters) |
variable = new HiRDBNCHAR(int n); | (n*2) bytes (n double-byte characters) (1 |
|
variable = new HiRDBNCHAR(String t) | Length of t (length of (byte array/2) obtained with t.getBytes()) | |
HiRDBNVARCHAR | variable = null; | 32,000 bytes (16,000 double-byte characters) |
variable = new HiRDBNVARCHAR(int n); | (n x 2) bytes (n double-byte characters) (1 |
|
variable = new HiRDBNVARCHAR(String t) | Length of t (length of (byte array/2) obtained with t.getBytes()) | |
HiRDBMCHAR | variable = null; | 30,000 bytes |
variable = new HiRDBMCHAR(int n); | n bytes (1 |
|
variable = new HiRDBMCHAR(String t) | Length of t (length of byte array obtained with t.getBytes()) | |
HiRDBMVARCHAR | variable = null; | 32,000 bytes |
variable = new HiRDBMVARCHAR(int n); | n bytes (1 |
|
variable = new HiRDBMVARCHAR(String t) | Length of t (length of byte array obtained with t.getBytes()) | |
HiRDBDECIMAL | variable = null; | Precision 15, scale 0 |
variable = new HiRDBDECIMAL(int p,int s); | Precision p, scale s (1 |
|
variable = new HiRDBDECIMAL(String t) | The precision is the character string length obtained when the sign and period characters are subtracted from t. The scale is the character string length after the period (excluding the period). | |
variable = newHiRDBDECIMAL(java.math.BigDecimal t) | The precision is the character string length obtained when the flag and period characters of the character string retrieved with toString() are subtracted from t. The scale is the value retrieved by the scale() method of the BigDecimal object. | |
HiRDBBLOB | variable = null; | 1 megabyte |
variable = new HiRDBBLOB(int n); | n bytes (1 |
|
variable = new HiRDBBLOB(byte[] t) | Length of t | |
HiRDBBINARY | variable = null; | 1 megabyte |
variable = new HiRDBBINARY(int n); | n bytes (1 |
|
variable = new HiRDBBINARY(byte[] t) | Length of t | |
Java.math.BigDecimal | variable = null; | Precision 15, scale 0 |
variable = new java.math.BigDecimal; | The precision is set to the character string length obtained when the flag and period characters in the character string retrieved by toString() are subtracted from the BigDecimal object. The scale is set to the value retrieved by the scale() method. | |
byte[] | variable = null; | 1 megabyte |
variable = new byte[int n] | n bytes (1 |
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.