Hitachi

Hitachi Advanced Database Application Development Guide


19.7.3 a_rdb_SQLDataType_t structure (data type information)

Organization of this subsection

(1) Function

The following information is stored in a_rdb_SQLDataType_t structures:

For details about a_rdb_SQLDescribeCols(), see 19.4.6 a_rdb_SQLDescribeCols() (acquire information about the retrieval result columns). For details about a_rdb_SQLDescribeParams(), see 19.4.7 a_rdb_SQLDescribeParams() (acquire dynamic parameter information).

(2) Format

typedef struct a_rdb_TG_DataType {
  signed int            DataType ;                /* Out */
  unsigned short        ElementCount ;            /* Out */
  char                  _DataType_rsv01[2] ;
  unsigned int          DataLength1 ;             /* Out */
  unsigned int          DataLength2 ;             /* Out */
  char                  _DataType_rsv02[16] ;
} a_rdb_SQLDataType_t ;

(3) Members

DataType

Stores a data type code.

ElementCount

Stores information about the data structure.

A value of 1 is stored.

DataLength1

If a_rdb_SQLDescribeCols() is executed, the column length is acquired. If a_rdb_SQLDescribeParams() is executed, the parameter length is acquired.

For details about the value to be specified, see 19.4.6 a_rdb_SQLDescribeCols() (acquire information about the retrieval result columns) or 19.4.7 a_rdb_SQLDescribeParams() (acquire dynamic parameter information).

DataLength2

If a_rdb_SQLDescribeCols() is executed, the column length attribute is acquired. If a_rdb_SQLDescribeParams() is executed, the parameter length attribute is acquired.

For details, see 19.4.6 a_rdb_SQLDescribeCols() (acquire information about the retrieval result columns) and 19.4.7 a_rdb_SQLDescribeParams() (acquire dynamic parameter information).

(4) Notes

When you use an a_rdb_SQLDataType_t structure, make sure that you first initialize the area to all zeros, and then specify a value for each member to be used.