![]() | ![]() | Programming Guide |
Frees memory associated with an SQL SELECT statement
#include <tmusubs.h>int dm_free_sql_info(int type);
type- The type of SQL
SELECTstatement, eitherSELECTorVALIDATE. When this function is called by the standard transaction models, the type is set toSELECTfor the transaction commandsSELECTandVIEW, and the type is set toVALIDATEfor the transaction commandVALIDATE_LINK.
- 0
dm_free_sql_infois used to free data that is associated withSELECTorVALIDATEstatements. If the type isSELECT, it should follow theBUILD_SELECTorPERFORM_SELECTprocessing performed indm_exec_sql.If the type is
VALIDATE, it should follow theBUILD_VALIDATEandPERFORM_VALIDATEprocessing performed indm_exec_sqlas well as any call todm_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);