SQL/MP Programming Manual for C

Converting C Programs
HP NonStop SQL/MP Programming Manual for C429847-008
D-5
Generating a Version 2 SQLDA Structure
data_len
data_len depends on the data type:
Fixed-length character Number of bytes in the string.
Variable-length character Maximum number of bytes in the string.
Decimal numeric Bits 0:7 contain the decimal scale.
Bits 8:15 contain the byte length of the item.
Binary numeric Bits 0:7 contain the decimal scale.
Bits 8:15 contain the byte length of the item (2,
4, or 8).
Date-time or INTERVAL Bits 0:7 contain a value for the range date-time
fields. For the table of values, see Section 10,
Dynamic SQL Operations.
Bits 8:15 contain the storage size of the
item.
precision
Binary numeric Numeric precision.
Date-time or INTERVAL Bits 0:7 contain the leading field precision.
Bits 8:15 contain the fraction precision (or 0, if
the fraction field is not included.
null_info
For input parameters A negative integer if the column permits null
values.
For output columns A negative integer if the row returned is null.
var_ptr
Extended address of the actual data (value of input parameter or
column). NonStop SQL/MP does not return var_ptr; a program must
initialize var_ptr to point to the input and output data buffers
ind_ptr
Address of a flag that indicates whether a parameter or column is
actually null.
For input parameters A program sets the ind_ptr location to –1 if
the user entered a null value.
For output columns NonStop SQL/MP sets the ind_ptr location
to –1 if the column value is null.
If a program does not process null values, set the ind_ptr location to
an invalid address.
Table D-2. Version 2 SQLDA Structure Fields (page 2 of 2)
Field Name Description