Programming Guide



dm_gen_sql_info

Generates a data structure used in SELECT statement generation

#include <tmusubs.h>
int dm_gen_sql_info(int type, char *cursor_name);

type
Type of SELECT to generate, specified by one of these constants:
SELECT
VALIDATE
CHECK_PKEY

cursor_name
Name of the cursor associated with the SQL statement.

Returns

Description

dm_gen_sql_info generates a data structure associated with SELECT statements. The type is SELECT when the function is called as the result of the transaction commands SELECT and VIEW. The type is VALIDATE when the function is called as a result of processing a validation link. The type is CHECK_PKEY when the function is called as a result of checking for duplicate key values before inserting a new row or updating the primary key columns.

Example

int gen_select (cursor)
char *cursor;
{
int retcode;
retcode = dm_gen_sql_info(SELECT, cursor1);
...
return retcode;
}

See Also

dm_free_sql_info