Scalable Database Server, HiRDB Version 8 UAP Development Guide

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

18.3.5 Output variable settings (limited to the native interface version)

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. Table 18-5 lists the initial value of each data type and the data length set in the SQL descriptor area.

Table 18-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 [Figure] n [Figure] 30,000)
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 [Figure] n [Figure] 32,000)
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 [Figure] n [Figure] 15,000)
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 [Figure] 2) bytes (n double-byte characters) (1 [Figure] n [Figure] 16,000)
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 [Figure] n [Figure] 30,000)
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 [Figure] n [Figure] 32,000)
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 [Figure] p [Figure] 29, 0 [Figure] s [Figure] p)
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 [Figure] n [Figure] 2,147,483,647)
variable = new HiRDBBLOB(byte[] t) Length of t
HiRDBBINARY variable = null; 1 megabyte
variable = new HiRDBBINARY(int n); n bytes (1 [Figure] n [Figure] 2,147,483,647)
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 [Figure] n [Figure] 2,147,483,647)