Re: I-4GL 4.10 Input Array Annoyance
Posted in 1995
In article <41udp3$abo@arcadia.informatik.uni-muenchen.de>, spitz@GANS2X.ana.med.uni-muenchen.de says... > >Mike Lemon (Mike_Lemon@mdl.pdial.interpath.net) wrote: > >: One of the most annoying features of the 4GL input array statement >: occurs when the database has columns defined as not null and the user >: hits ESCAPE on an empty line. Rather than realizing that the line is >: empty, the program demands that the user enter something into the field. >: [...] >: Anyone know of an input array option which will eliminate this? Could >: this be a function of using version 4 4GL with a level 5 database engine >: (Online)? > >Mike, > >the described behavior occurs when you define your record variables using >the LIKE statement. That not only preserves the datatype of the columns >you are referring to, but also the NOT NULL attribute. > >The only way around this is to hardcode the variable definitions and >eliminating LIKE where this problem occurs. > >Hope this helps, >Richard >-- >+----------------------------+-------------------------------------------+ >| Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | >| EDV-Gruppe Anaesthesie | Tel : +49-89-7095-3421 | >| Klinikum Grosshadern | FAX : +49-89-7095-8886 | >| 81366 Munich, Germany | | >+----------------------------+-------------------------------------------+ As a follow up, if NOT using the LIKE syntax overcomes the annoyance in the form, an error will be generated, which you've probably figured out by now, when you press ESC, and try to INSERT or UPDATE a NOT-NULL column with 'NO' value. You might've overcome the screen handler, but the data base engine will still protect the column. You might want to use the AFTER ROW syntax to validate the fields after leaving the row, so if the row is empty no UPDATE/INSERT is performed. You can use the LENGTH( string ) function to test strings, etc. And function calls are permitted inside an INPUT ARRAY block to keep your coding a little cleaner. Cheers, ( burp ) Tim