Re: D4gl - Columns with not null
Posted in 1998
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Internationalization & Character Sets
Steven Weiss wrote: > Hi > > We're running D4gl 2.02 on NT 4 workstation. We've compiled the programs > and forms on SCO Openserver 5.04 and seem to be having the following > problem when running the programs. > > The form has the following type definition > > f001=tableName.columnName; > > tableName.columnName is defined on the database as being a NOT NULL column. > The input by name statement lets nulls through however. > > Does anyone know if this is a known bug and if there is a solution for it. > We are also using fglschema 2.01.1a, Possibly this is where the problem > lies. > > Thanks in advance > > Steve Weiss This bug also exists on the following versions: Informix Dynamic-4GL 2.00.UC1 (SCO OpenServer 5.0.x) Informix Dynamic-4GL 2.01.UC2 (SCO OpenServer 5.0.x ... I'm not sure if it is 2.01.UC1 or 2.01.UC2... I'm posting this message at home...) 4J's compiler 2.02.1e6l6 (SCO OpenServer 5.0.x and Microsoft Windows NT 4.0) 4J's compiler 2.02.1e6k3 (SCO OpenServer 5.0.x) This bug DOES NOT exists on the following versions of previous Informix languages: Informix 4GL-RDS 4.10.UC2 Informix 4GL-RDS 6.03.UC? How we "solved" the problem: We had to alter our 4GL files to do an extra test in the AFTER INPUT section, like this example: # # on the form, the field "my_field" is associated with a NOT NULL column... (note the "--#": the # following example can be used with Informix 4GL-RDS and Informix Dynamic 4GL (and of course # with the 4J's compiler) # INPUT my_variable WITHOUT DEFAULTS FROM my_field AFTER INPUT IF NOT int_flag THEN --# IF my_variable IS NULL THEN --# ERROR "This field requires an entered value." --# NEXT FIELD my_field --# END IF # # Do other tests here... # END IF END INPUT Vitorino Ribeiro SINFIC - Sistemas de Informa''o Industriais e Consultoria, SA sinfic@esoterica.pt http://homepage.esoterica.pt/~sinfic