First of all, there are several new EGL packages in the EGLSource folder of your EGLWeb project, including eglderbydb.data, eglderbydb.access, and eglderbydb.primitivetypes.data. Packages work just like folders: they contain your source code files and organize them into meaningful groups. In this case, the eglderbydb.data package holds the records, the eglderbydb.access package holds the libraries, and the eglderbydb.primitivetypes.data package holds the DataItems.
dataitem CustomerId INT end
In
this case, the ID number field is based on the integer primitive type.
The DataItem can have other properties to specify details like its
valid range of values and how it should be formatted in the UI.record Customer type sqlRecord {
tablenames=[["EGL.CUSTOMER"]],
fieldsMatchColumns = yes,
keyItems=[CUSTOMERID]
}
CUSTOMERID CUSTOMERID {column="CUSTOMERID"};
FIRSTNAME FIRSTNAME {column="FIRSTNAME", sqlVariableLen=yes, maxLen=30, isSqlNullable=yes};
LASTNAME LASTNAME {column="LASTNAME", sqlVariableLen=yes, maxLen=30, isSqlNullable=yes};
...
end