Programming Guide |
Frees memory associated with a SELECT statement
#include <tmusubs.h>int dm_free_sql_info(int type);
type
- The type of
SELECT
statement, eitherSELECT
orVALIDATE
. When this function is called by the standard transaction models, the type is set toSELECT
for the transaction commands SELECT and VIEW, and the type is set toVALIDATE
for the transaction commandVALIDATE_LINK
.
- 0
dm_free_sql_info
is used to free data that is associated withSELECT
orVALIDATE
statements. If the type isSELECT
, it should follow theBUILD_SELECT
orPERFORM_SELECT
processing performed indm_exec_sql
.If the type is
VALIDATE
, it should follow theBUILD_VALIDATE
andPERFORM_VALIDATE
processing performed in dm_exec_sql as well as any call to dm_val_relative.
int retcode;
char *sel_cursor;
...
retcode = dm_exec_sql(BUILD_SELECT, sel_cursor);
if (!retcode)
retcode = dm_exec_sql(PERFORM_SELECT, sel_cursor);
dm_free_sql_info(SELECT);