Dynamic DEALLOCATE DESCRIPTOR Statement

The dynamic DEALLOCATE DESCRIPTOR statement provides a way of using Progress/ESQL to deallocate the memory for an SQL descriptor area (SQLDA_T structure) that you previously allocated using the ALLOCATE DESCRIPTOR statement (or the sqlald() ESQL-LIB function). The preprocessor generates a call to sqldld() for this statement.

Following is the syntax for the dynamic DEALLOCATE DESCRIPTOR statement:

SYNTAX
EXEC SQL DEALLOCATE DESCRIPTOR psqlda; 

psqlda

The name of a pointer to an SQLDA_T structure that an ALLOCATE DESCRIPTOR statement or sqlald() function previously allocates.

CAUTION: Deallocate all allocated memory to which SQLVAR_T structures refer in the SQL descriptor area before you deallocate the descriptor area. Otherwise, the memory pointers (DATA and INDICATOR) are lost and the memory cannot be freed.

Do not deallocate the same SQL descriptor area more than once. This can cause a memory violation. Do not attempt to invoke the DEALLOCATE DESCRIPTOR statement with any value for psqlda other than what a previous ALLOCATE DESCRIPTOR statement or call to sqlald() returns. This causes unpredictable behavior.

Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095