10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

How You Can Build a Frame Dynamically/* variables used for generating the** source code *//* select statement string */selectstring = varchar(2000) not null;/* FETCH statement string */fetchstring = varchar(2000) not null;/* UPDATE statement string */updatestring = varchar(2000) not null;/* update clause string */selectupdatestring = varchar(2000) not null;/* Variables for dictionary information of the** table columns used in select choices */tmp_table_name = varchar(32) not null;/* used in getting column names */columnname = varchar(32) not null;/* used in getting columns */columndatatype = varchar(32) not null;/* used in getting columns */columnlength = integer not null;/* Variables used as holders of form** objects, etc. */test_frame = FrameSource default null;/* The frame being generated */top_menu = MenuGroup default null;/* The menu being generated */test_menu = MenuButton default null;/* The menu item */field_ptr = EntryField default null;/* Ptr to entry field */trim_ptr = FreeTrim default null;/* The trim ptr *//* Name of generated frame */test_frame_name = varchar(32) not nullenddeclareHow You Can Select Tables for the Option FieldThe starting frame lets the user pick a table from a list of tables presented inan option field. The initialize block contains the code that fills in the list of tablechoices. The DynamicFrame frame lets the user select from any table ownedby the user or the database's DBA (which are available to any user with thenecessary permissions).The following statements from the sample application retrieve the name of thedatabase's DBA from the iidbconstants catalog and release the lock taken bythe select statement:/* Get the dba name for finding the tables */select dba_name as :dbanamefrom iidbconstants;commit;Creating a Frame at Runtime 399

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!