14. Creating a Frame at Runtime : How You Can Build a Frame Dynamically : How You Can Create the FrameSource Object : How You Can Complete the SQL Statements
 
Share this page                  
How You Can Complete the SQL Statements
The Go operation finishes creating the text of the SQL statements begun in the select loop. Adding formatting characters and the final clause completes the selectstring variable. Adding the terminating semicolon completes the selectupdatestring and fetchstring variables. The following code from the DynamicFrame frame completes the text for the variables used in the SQL statements:
/* Now complete the select and fetch strings */
selectstring = selectstring + HC_NEWLINE + HC_TAB +
    HC_TAB + 'from ' + table_choices;
selectupdatestring = selectupdatestring + ';';
fetchstring = fetchstring + ';';
The completed strings are used later when the frame script for the generated frame is constructed.