sqldld() — Deallocate Dynamic Descriptor Area

Deallocates the memory for an SQL descriptor area, including the SQLDA_T structure and associated SQLVAR_T structures that sqlald() previously allocates. Supports the EXEC SQL DEALLOCATE DESCRIPTOR... statement.

This function returns normalized values. For more information, see the function return values in the "General Diagnostics" section in this chapter:

SYNTAX
int
sqldld ( psqlda )
  struct SQLDA_T    *psqlda;    /* INPUT-OUTPUT */ 

psqlda

A pointer to a SQLDA_T structure that sqlald() previously allocates.

NOTES

CAUTION: Be sure to deallocate all allocated memory referenced by SQLVAR_T structures 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 call sqldld() with any value for psqlda other than those a previous call to sqlald() returns. This causes unpredictable behavior.
EXAMPLE

This example deallocates memory for the SQL descriptor area to which ptable refers, but only if ptable points somewhere (is non-null):

#include "proesql.h"
struct SQLDA_T *ptable;
............
............
if (ptable) sqldld(ptable;
............ 

SEE ALSO

sqlald() — Allocate Dynamic SQL Descriptor, sqlalloc() — Allocate Dynamic Memory, sqlfree() — Deallocate Dynamic Memory, proesql.h


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