Kbase P93601: How to obtain the list of fields in a table without walking through the metaschema?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  03/09/2004 |
|
Status: Unverified
GOAL:
How to obtain the list of fields in a table without walking through the metaschema?
FACT(s) (Environment):
Progress 9.x
FACT(s) (Environment):
OpenEdge 10.x
FIX:
The following code shows how to obtain the list of fields in a table without walking through the metaschema of the database:
DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO.
DEFINE VARIABLE iLoop AS INTEGER NO-UNDO.
CREATE BUFFER hBuffer FOR TABLE 'Customer'.
DO iLoop = 1 TO hBuffer:NUM-FIELDS:
MESSAGE 'Field = ' hBuffer:BUFFER-FIELD(iLoop):NAME VIEW-AS ALERT-BOX.
END.
DELETE OBJECT hBuffer NO-ERROR.