The SQLABC and SQLN fields are input fields, and must be set before executing the DESCRIBE or PREPARE INTO statements. The other fields are output fields, and are filled in by the DESCRIBE statement. The SQLDA values expected by and assigned by the DESCRIBE statement are as follows:
|
Field |
Value Expected or Returned |
|---|---|
|
SQLAID |
SQLDA (set by CA Datacom/DB) |
|
SQLABC |
Length of the SQLDA, equal to SQLN*44 + 16 (set by CA Datacom/DB ) Note: If USING BOTH is used, upon return from the DESCRIBE, if SQLN was not large enough for both column names and the labels information, SQLD has been set to twice the number of columns, the correct value for SQLN. |
|
SQLN |
Total number of occurrences of SQLVAR provided in this SQLDA (set by user—see Determining Number of SQLVAR Entries to Use). |
|
SQLD |
Number of columns described by occurrences of SQLVAR, or twice this number when USING BOTH is specified (set by CA Datacom/DB). |
|
SQLVAR |
If the value returned for SQLD is 0, or greater than the value of SQLN, no values are assigned to occurrences of SQLVAR. If the value returned for SQLD is n, where n is greater than 0 but less than or equal to the value returned for SQLN, values are assigned to the first n occurrences of SQLVAR so that the first occurrence of SQLVAR contains a description of the first column of the table, the second occurrence of SQLVAR contains a description of the second column of the table, and so on. The description of a column consists of the values assigned to SQLTYPE, SQLLEN, and SQLNAME. If USING BOTH is used, the first n occurrences of SQLVAR contain column names (where they exist). The second n occurrences contain column labels. Occurrence n+1 contains the label of column 1; occurrence n+2, the label of column 2; and so on. |
|
Copyright © 2014 CA.
All rights reserved.
|
|