MDAC 2.5 SDK - ODBC Programmer's Reference
Chapter 13: Descriptors


 

Types of Descriptors

A descriptor is used to describe one of the following:

The descriptor types are summarized in the following table.

Buffer type Rows Dynamic parameters
Application buffer Application row descriptor (ARD) Application parameter descriptor (APD)
Implementation buffer Implementation row descriptor (IRD) Implementation parameter descriptor (IPD)

For either the parameter or the row buffers, if the application specifies different data types in corresponding records of the implementation and application descriptors, the driver performs data conversion when it uses the descriptors. For example, it may convert numeric and datetime values to character-string format. (For valid conversions, see Appendix D, "Data Types.")

A descriptor can perform different roles. Different statements can share any descriptor that the application explicitly allocates. A row descriptor in one statement can serve as a parameter descriptor in another statement.

It is always known whether a given descriptor is an application descriptor or an implementation descriptor, even if the descriptor has not yet been used in a database operation. For the descriptors that the implementation implicitly allocates, the implementation records the predefined row relative to the statement handle. Any descriptor that the application allocates by calling SQLAllocHandle is an application descriptor.