SQL Reference

Appendix C. SQL Descriptor Area (SQLDA)

An SQLDA is a collection of variables that is required for execution of the SQL DESCRIBE statement. The SQLDA variables are options that can be used by the PREPARE, OPEN, FETCH, EXECUTE, and CALL statements. An SQLDA communicates with dynamic SQL; it can be used in a DESCRIBE statement, modified with the addresses of host variables, and then reused in a FETCH statement.

SQLDAs are supported for all languages, but predefined declarations are provided only for C, REXX, FORTRAN, and COBOL. In REXX, the SQLDA is somewhat different than in the other languages; for information on the use of SQLDAs in REXX see the Application Development Guide.

The meaning of the information in an SQLDA depends on its use. In PREPARE and DESCRIBE, an SQLDA provides information to an application program about a prepared statement. In OPEN, EXECUTE, FETCH, and CALL, an SQLDA describes host variables.

In DESCRIBE and PREPARE, if any one of the columns being described is either a LOB type111, reference type, or a user-defined type, the number of SQLVAR entries for the entire SQLDA will be doubled. For example:

In EXECUTE, FETCH, OPEN, and CALL, if any one of the variables being described is a LOB type 111 or structured type, the number of SQLVAR entries for the entire SQLDA needs to be doubled. 112

Related Information:


Footnotes:

111
LOB locators and file reference variables do not require doubled SQLDAs.

112
Distinct types and reference types are not relevant in these cases, since the additional information in the double entries is not required by the database.


[ Top of Page | Previous Page | Next Page ]