Programming Guide



dm_free_sql_info

Frees memory associated with a SELECT statement

#include <tmusubs.h>
int dm_free_sql_info(int type);

type
The type of SELECT statement, either SELECT or VALIDATE. When this function is called by the standard transaction models, the type is set to SELECT for the transaction commands SELECT and VIEW, and the type is set to VALIDATE for the transaction command VALIDATE_LINK.

Returns

Description

dm_free_sql_info is used to free data that is associated with SELECT or VALIDATE statements. If the type is SELECT, it should follow the BUILD_SELECT or PERFORM_SELECT processing performed in dm_exec_sql.

If the type is VALIDATE, it should follow the BUILD_VALIDATE and PERFORM_VALIDATE processing performed in dm_exec_sql as well as any call to dm_val_relative.

Example

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);

See Also

dm_gen_sql_info