Null in D4gl
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
The problem seems to be with the "WITHOUT NULL INPUT" of the section DATABASE in a form. In 4GL, it sends a space (blank) for all the fields even if it is null, so in the program, we don't have to test for null input. In D4GL, it does send a null instead of a blank even if the "WITHOUT NULL INPUT" clause is present. This Solution not work in D4gl Version 2.10.4c2 in SCO OPENSERVER 5.0.5 IS THIS A BUG?
Jose Luis Espinosa Milla wrote: > The problem seems to be with the "WITHOUT NULL INPUT" of the section > DATABASE in a form. In 4GL, it sends a space (blank) for all the fields even > if it is null, so in the program, we don't have to test for null input. In > D4GL, it does send a null instead of a blank even if the "WITHOUT NULL > INPUT" clause is present. > > This Solution not work in D4gl Version 2.10.4c2 in SCO OPENSERVER 5.0.5 > IS THIS A BUG? Sort of, but not one I have very much sympathy with. The WITHOUT NULL INPUT was provided to enable people with ISQL 1.10 to upgrade to ISQL 2.00 without breaking their code. ISQL 1.10 did not have nulls at all. Only people who had ISQL code with version 1.10 of ISQL have any real excuse to be using WITHOUT NULL INPUT, and since that was all 13 years ago, the code would normally have been modified by now. I4GL 1.00 (released at the same time as ISQL 2.00) had the WITHOUT NULL INPUT option, primarily because ISQL did (and the two form compilers are closely related). So, IMNSHO, any I4GL code using WITHOUT NULL INPUT is inherently buggy simply because it uses WITHOUT NULL INPUT. However, if you want to be pedantically precise, then D4GL should behave the same as I4GL, so you could probably claim that you've found a compatability bug in D4GL. Whether it will ever be fixed by 4J's depends in part on whether it is reported to them, and in part on how much sympathy they have for the 'strict compatability' versus 'sane coding' debate outlined above. FWIW, I would not apply much pressure on them to get it fixed. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN #include <disclaimer.h>