Call Level Interface Guide and Reference
There are four types of descriptors, as follows:
- Application Parameter Descriptor (APD)
- Describes the application buffers (pointers, data types, scale, precision,
length, maximum buffer length, and so on) that are bound to parameters in an
SQL statement. If the parameters are part of a CALL statement they may be
input, ouput, or both. This information is described using the
application's C data types.
- Application Row Descriptor (ARD)
- Describes the application buffers bound to the columns. The application
may specify different data types from those in the implementation row
descriptor to achieve data conversion of column data. This descriptor reflects
any data conversion that the application may specify.
- Implementation Parameter Descriptor (IPD)
- Describes the parameters in the SQL statement (SQL type, size, precision,
and so on).
- If the parameter is used as input, this describes the SQL data that the
database server will recive after DB2 CLI has performed any required
conversion.
- If the parameter is used as output, this describes the SQL data before DB2
CLI performs any required conversion to the application's C data types.
- Implementation Row Descriptor (IRD)
- Describes the row of data from the result set before DB2 CLI performs any
required data conversion to the application's C data types.
The only difference between the four types of descriptors described above
is how they are used. One of the benefits of descriptors is that a single
descriptor can be used to serve multiple purposes. For instance, a row
descriptor in one statement can be used as a parameter descriptor in another
statement.
As soon as a descriptor exists it is either an application descriptor or an
implementation descriptor. This is the case even if the descriptor has not yet
been used in a database operation. If the descriptor is allocated by the
application using SQLAllocHandle() then it is an application
descriptor.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]