Progress
Programming
Handbook
Specifying Field Lists in the 4GL
You can specify a field list in two different 4GL contexts:
This is the syntax for specifying a field list in all cases:
The record–bufname reference specifies the table buffer you are using for the fetch, and a field reference specifies a field in the table. If field is an array reference, the whole array is fetched. The FIELDS form lists the fields included in the fetch, and the EXCEPT form lists the fields excluded from the fetch. FIELDS without field references fetches enough information to return the ROWID of a record, and EXCEPT without field references or record–bufname alone fetches a complete record.
Queries versus Record Selection Blocks
For a query, you must specify the field lists in the DEFINE QUERY statement, not the Record phrase of the OPEN QUERY statement. Thus, the following two procedures,
p-fldls1.p
andp-fldls2.p
, are functionally equivalent:
Shared Queries
If you specify field lists in a NEW SHARED query, the matching SHARED query definitions in external procedures only have to include the FIELDS or EXCEPT keyword as a minimum field list reference. The complete field list is optional in the SHARED query definitions, but required in the NEW SHARED query definition.
However, Progress raises the ERROR condition when you run a procedure with a SHARED query if you:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |