ALLOCATE DESCRIPTOR Statement [ESQL]

Allocates space for a SQL descriptor area (SQLDA).

Syntax

ALLOCATE DESCRIPTOR descriptor-name
… [ WITH MAX integer | host-variable } ]

Parameters

Examples

Usage

You must declare the following in your C code prior to using this statement:

struct sqlda * descriptor_name

The WITH MAX clause lets you specify the number of variables within the descriptor area. The default size is 1.

You must still call fill_sqlda to allocate space for the actual data items before doing a fetch or any statement that accesses the data within a descriptor area.

Standards

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Supported by Open Client/Open Server.

Related reference
DEALLOCATE DESCRIPTOR Statement [ESQL]