sqld | 4 (columns) | ||
sqlvar(1) | sqltype | = | 30 (integer) |
sqllen | = | 4 | |
sqlname | = | 'o_id' | |
sqlvar(2) | sqltype | = | 20 (char) |
sqllen | = | 100 | |
sqlname | = | 'o_desc' | |
sqlvar(3) | sqltype | = | 5 (money) |
sqllen | = | 0 | |
sqlname | = | 'o_price' | |
sqlvar(4) | sqltype | = | -3 (nullable date) |
sqllen | = | 0 | |
sqlname | = | 'o_sold' |
Data Type | Contents of sqllen |
char and varchar | Maximum length of the character string. |
byte and byte varying | Maximum length of the binary data. |
long varchar and long byte | Length of the string. If the length exceeds the maximum value of a 2-byte integer, sqllen is set to 0. Long varchar and long byte columns can contain up to 2 GB of data. To avoid buffer overflow, be sure to allocate a host language variable that is large enough to accommodate your data. |
integer and float | Declared size of the numeric field. |
date | 0 (the program must use a 25-byte character string to retrieve or set date data). |
money | 0 (the program must use an 8-byte floating point variable to retrieve or set money data). |
decimal | High byte contains precision, low byte contains scale. |
sqlvar(1) | sqltype | = | 30 (integer not nullable) |
sqllen | = | 4 | |
sqldata | = | Address of 4-byte integer | |
sqlind | = | 0 | |
sqlname | = | 'o_id' | |
sqlvar(2) | sqltype | = | 20 (char not nullable) |
sqllen | = | 100 | |
sqldata | = | Address of 100-byte character string | |
sqlind | = | 0 | |
sqlname | = | 'o_desc' | |
sqlvar(3) | sqltype | = | 31 (float not nullable, was money) |
sqllen | = | 8 (was 0) | |
sqldata | = | Address of 8-byte floating point | |
sqlind | = | 0 | |
sqlname | = | 'o_price' | |
sqlvar(4) | sqltype | = | -20 (char nullable, was date) |
sqllen | = | 25 (was 0) | |
sqldata | = | Address of 25-byte character string | |
sqlind | = | Address of 2-byte indicator variable | |
sqlname | = | 'o_sold' |