informix
Informix Guide to SQL: Syntax
SQL Statements

DEALLOCATE DESCRIPTOR

Use the DEALLOCATE DESCRIPTOR statement to free a previously allocated, system-descriptor area.

Use this statement with ESQL/C.

Syntax

Element Purpose Restrictions Syntax
descriptor Quoted string that identifies a system-descriptor area System-descriptor area must already be allocated. The surrounding quotes must be single. Quoted String, p. 4-260
descriptor_var Host variable name that identifies a system-descriptor area System-descriptor area must already be allocated. Name must conform to language-specific rules for variable names.

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. 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.

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 Informix ESQL/C Programmer's Manual.


Informix Guide to SQL: Syntax, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved