Re: Set up variable prior to CONSTRUCT
Posted in 1998
I was damn sorely tempted not to answer -- if you can't be bothered to identify yourself with a real name and email address, why should we bother to answer your questions. And, in general, I don't. On Thu, 17 Sep 1998, H (xxx@xxx.xxx) wrote: > I want to implement a CONSTRUCT statement that includes a field that > was preset with a value before entering the CONSTRUCT but this field > is cleared, or set to null, on entering the CONSTRUCT statement. > > My code is: > > DISPLAY "JK" TO stsze.sizeid > CONSTRUCT g_q01_txt > ON stsze.sizeid, stsze.descr, stsze.lastuser > FROM stsze.sizeid, stsze.descr, stsze.lastuser > > I want the sizeid field to be set to a value so that the user has the > choice of leaving it there or overriding it. > > We are running Informix RDS V 4.0 but will be moving to V 4.2 soon. Using 4.0, I think you're out of luck -- the necessary features were introduced in 4.10 unless my memory is failing me. With 4.10 and above, you can (in principle), use a BEFORE CONSTRUCT clause to DISPLAY the preset values to the query, and collect the values afterwards in an AFTER CONSTRUCT with GET_FLDBUF(). In earlier 4.1x versions, if you tried to DISPLAY a 78 character string to a 30 character field, the extra character got truncated. With later versions, the overflow characters were stored and will be displayed in the extension line at the bottom of the form when the cursor enters the field. I think later starts with the 4.14/6.02 release pair. Yours, Jonathan Leffler (jleffler@informix.com) #include <witticism.h> Guardian of DBD::Informix v0.60 -- http://www.perl.com/CPAN Informix IDN for D4GL & Linux -- http://www.informix.com/idn