Field "List"?

Doug Johnson

New Member
Within the Progress language can we ask for the "field list" similar to how you might ask Mysql for a "describe database.tablename" of a database?

Thanks
 

Cringer

ProgressTalk.com Moderator
Staff member
What is it you are trying to achieve? There are a couple of ways of doing what you want. There are VSTs (Virtual System Tables) that hold all that info, there is also the data dictionary. It all depends what you want to do.
 

Doug Johnson

New Member
V9.1E - windows xp

We just need a listing of all of the fields for a specific table. Something like the following:

Tablename
fieldname1
fieldname2
fieldname3
fieldname4
fieldname5
fieldname6
fieldname7

We currently can look in the dictionary but the fields are not all listed together. We have to scroll through each one separately.
 

Cringer

ProgressTalk.com Moderator
Staff member
Have a look at the _file and _field tables. _file._file-name is the table name, _field._field-name is the name of the field. There's other info available on these tables too. You can see them in the Data Dictionary if you go to View>Show hidden tables.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
In a character editor, go to Tools | Data Dictionary. Then go to Database | Reports ->. If you just want a list of the fields in a table, select Quick Field from the list of reports. If you want more detailed information on the schema definition of that table, select Detailed Table and pick your table from the list.

As Cringer indicated, you can also approach this programmatically if you like.

Code:
define variable tbl as character no-undo.

assign tbl = "customer".
display tbl label "Table".

find _File no-lock where _File._File-Name = tbl no-error.

for each _Field no-lock where _Field._File-Recid = recid(_File):
  display _Field._Field-Name no-error.
end.
 
Top