Problem Initializing CONSTRUCT-Fields
Posted in 1995
Topics: Installation, Setup & Upgrades, Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Our Configuration and installation-order: SCO 3.2.4 Informix SQL 4.11.UC1 Informix RDS 4.11.UC1 Informix ID 4.11.UC1 Informix Online 5.01.UD2 I have a Problem with a well-documented 4GL-Feature of the Construct- Statement: It is more than boring that everytime you enter a CONSTRUCT ... END CONSTRUCT Clause, you have to type in your Search-Criteria again and again. Informix pronounced a solution for this problem in its book `4GL Supplement Version 4.1' on page 84: " ... You can use DISPLAY statements in the BEFORE CONSTRUCT clause to populate the fields; DISPLAY initializes the field buffers to the displayed values. ..." A similar statement is given in the explanation of the BEFORE FIELD clause. We really tried everything, here the code: {CODE STARTS} display form m_1 let done = false let accepted = false # One of our last desperate tries was the initialization # of the variable query let query = "demo.demo_text = \\"Abri*\\"" construct query on demo.* from sc_1.* # construct by name query on demo.* before construct # 1st try let pr1demo.demo_text = "Abri*" clipped display by name pr1demo.demo_text # display pr1demo.demo_text to sc_1.demo_text sleep 1 continue construct before field demo_text # 2nd try # display by name pr1demo.demo_text display pr1demo.demo_text to sc_1.demo_text sleep 1 continue construct after field demo_text error "After field clause passed" on key (f2) # 3rd try let pr1demo.demo_text = "Abri*" clipped display pr1demo.demo_text to sc_1.demo_text sleep 1 continue construct on key (escape) let done=true exit construct on key (interrupt) error "Bitte die Auswahl mit <ESC> abbrechen" continue construct after construct let accepted = true end construct {CODE ENDS} While the sleep - Statement is active, we see the value of the initialized programrecord-member on the screen, but as soon as the construct continues, the screen is empty again - and so ist the variable query! So, our question here is: Did anyone of you try to realize an initialization of construct-fields and did you succeed? Thanks in advance, Richard -- Richard Bahcic Email: rb@argon.in-ulm.de