Appends text to the end of a SELECT statement for automatic SQL generation#include <tmusubs.h>int dm_gen_change_select_suffix(char *arg, char *suffix);
- Reserved for future use.
- The suffix to append to the generated
dm_gen_change_select_suffixlets you append text to the end of a generated
SELECTstatement built with the SQL generator. For example, you can use this function to add a
FOR UPDATEclause to the end of a
SELECTstatement. The data structure for the
SELECTstatement, built by an earlier call to dm_gen_sql_info (generally in the
TM_SEL_GENevent), must already exist before this function is called.
By default, the SQL generator builds the statement based on the widgets' and table view's property settings. For more information on the SQL generator, refer to Chapter 33, "Using Automated SQL Generation," in Application Development Guide.
You can use this function in a transaction manager event function that processes the
TM_SEL_BUILD_PERFORMevent. To modify the select processing for a server view, call
dm_gen_change_select_suffixfrom an event function that is attached to the first parent table view in the server view.
For more information on writing transaction event functions, refer to Chapter 32, "Writing Transaction Event Functions," in Application Development Guide.
# JPL Procedure:
# Fetch data from titles for possible update.
# Function property is set to titles_select.
proc titles_select (event)
if (event == TM_SEL_BUILD_PERFORM)
retval = dm_gen_change_select_suffix("", "for update")
if (retval != 0)