SQLDA Structure | Description |
---|---|
sqldaid | 8-byte character array assigned the blank-padded value SQLDA. |
sqldabc | 4-byte integer assigned the size of the SQLDA. |
sqln | 2-byte integer indicating the number of allocated sqlvar elements. This value must be set by the program before describing a statement, form, or table field. The value must be greater than or equal to zero. |
sqld | 2-byte integer indicating the number of result columns associated with the DESCRIBE statement. This number specifies how many of the allocated sqlvar elements were used to describe the statement. If sqld is greater than sqln, the program must reallocate the SQLDA to provide more storage buffers and reissue the DESCRIBE statement. To use the SQLDA to place values in a table, the program must set sqld to the correct number before the SQLDA is used in a statement. When describing a dynamic SQL statement, if the value in sqld is zero, the described statement is not a SELECT statement. |
sqlvar | A sqln-size array composed of the following elements: • sqltype—2-byte integer indicating the length data type of the column, variable, or field. • sqllen—2-byte integer indicating the length of the column, variable, or field. • sqldata—Pointer. • sqlind—Pointer to indicator variable associated with the host language variable. Your program must also allocate the memory to which this variable points. • sqlname—The result column name (when a SELECT statement is described). |
Data Type Name | Data Type Code | Nullable |
---|---|---|
byte | 23 | No |
-23 | Yes | |
byte varying | 24 | No |
-24 | Yes | |
C | 32 | No |
-32 | Yes | |
char | 20 | No |
-20 | Yes | |
date | 3 | No |
-3 | Yes | |
decimal | 10 | No |
-10 | Yes | |
float | 31 | No |
-31 | Yes | |
integer | 30 | No |
-30 | Yes | |
long byte | 25 | No |
-25 | Yes | |
long varchar | 22 | No |
-22 | Yes | |
money | 5 | No |
-5 | Yes | |
text | 37 | No |
-37 | Yes | |
varchar | 21 | No |
-21 | Yes |