Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

DEALLOCATE DESCRIPTOR

Use the DEALLOCATE DESCRIPTOR statement to free a previously allocated, system-descriptor area. Use this statement with ESQL/C.

Syntax

Read syntax diagramSkip visual syntax diagram>>-DEALLOCATE DESCRIPTOR--+-'descriptor'---+-------------------><
                          '-descriptor_var-'
 
Element Description Restrictions Syntax
descriptor Name of a system-descriptor area Use single quotes. System-descriptor area must already be allocated Quoted String
descriptor_var Host variable that contains the name of a system-descriptor area System-descriptor area must already be allocated, and the variable must already have been declared Name must conform to language-specific rules

Usage

The DEALLOCATE DESCRIPTOR statement frees all the memory that is associated with the system-descriptor area that descriptor or descriptor_var identifies. It also frees all the item descriptors (including memory for data items in the item descriptors).

You can reuse a descriptor or descriptor variable after it is deallocated. Otherwise, deallocation occurs automatically at the end of the program.

If you deallocate a nonexistent descriptor or descriptor variable, an error results.

You cannot use the DEALLOCATE DESCRIPTOR statement to deallocate an sqlda structure. You can use it only to free the memory that is allocated for a system-descriptor area.

The following examples show valid DEALLOCATE DESCRIPTOR statements. The first line uses an embedded-variable name, and the second line uses a quoted string to identify the allocated system-descriptor area.

EXEC SQL deallocate descriptor :descname;

EXEC SQL deallocate descriptor 'desc1';

Related Information

Related statements: ALLOCATE DESCRIPTOR, DECLARE , DESCRIBE, EXECUTE , FETCH , GET DESCRIPTOR , OPEN , PREPARE, PUT , and SET DESCRIPTOR

For more information on system-descriptor areas, refer to the IBM Informix ESQL/C Programmer's Manual.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]