List Tables and fileds in db

anandknr

Member
Hi all,

I need to list all the tables and its fileds in my db.
I know table names are in _file table and field names in _filed table.\but i don't have a common filed in both to join .

FOR EACH _File WHERE _File-number > 0
AND _Owner = "PUB"
AND _File-num < 32767 NO-LOCK
BY _File-name:

FOR EACH _Field WHERE _File-recid = _For-Id :
DISP _Field-Name _File._File-name WITH 2 COL .
END.

END.
Please help
 
Code:
FOR EACH _File NO-LOCK
   WHERE _File._Hidden = FALSE,
    EACH _Field NO-LOCK OF _File :

DISPLAY 
_File._File-Name LABEL "Table " FORMAT "X(15)"
_File._File-Label LABEL "Desc " FORMAT "X(20)"
_Field._Field-Name LABEL "Field Name " FORMAT "X(20)"
_Field._Data-Type LABEL "Data Type" FORMAT "X(9)"
 
Or to be more explicit:

Code:
for each _file  no-lock where _file._hidden = no,
     each _field no-lock where _field._file-recid = recid( _file ):

  display _file._file-name _field._field-name.

end.
 
Back
Top