Use formonly or database columns for field names?
Posted in 2008
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Is there a reason that I should or should not name the fields in the attribute section of a 4gl form the same as the database column? Does anyone just use formonly.parm1, formonly.parm2 etc... I guess using the database column name allows the use of "by name" in the 4gl program.
c320 wrote: > Is there a reason that I should or should not name the fields in the > attribute section of a 4gl form the same as the database column? Does > anyone just use formonly.parm1, formonly.parm2 etc... I guess using > the database column name allows the use of "by name" in the 4gl > program. The only reason why I would *not* name a field as tablename.columnname is if the field doesn't actually correspond to a database column. If the field does correspond to a database column, telling the form compiler about that allows the input statement to enforce constraints automatically based on the column type etc., and it helps make your code self-documenting. "By name" has nothing to do with this since "by name" works with formonly fields, too. HTH, -- Carsten Haese http://informixdb.sourceforge.net