Finding all tables with a given field name

jsp

New Member
Can anyone provide a quick way to find all tables that contain a given field name?

Thanks
 

fabio_prando

New Member
Pay Attention !

Hi JSP !

The sample that had been written by Norman, really works but Progress will just find the tables that are in the working database.


So, if you have more than one database you must run this program once for database connected. To change the database working database, in the Data Administration click on "Database" / "Select working database".

See U!

Fabio Prando
System Analyst - Brazil
 
U

Unregistered

Guest
Conseguiu?

Oi Fabio, sou do Brasil também , e estou procurando uma solução para conexão do ASP em Progresso, como fazer?, vc conseguiu alguma coisa?
 
To list all tables in all connected databases, do the following:

DEF VAR i AS INT NO-UNDO.
REPEAT i = 1 TO num-dbs:
RUN changealias(INPUT i).
RUN listtable(INPUT "Your Field Name") .
END.

/* changealias.p */
DEF INPUT PARAM i AS INT NO-UNDO.
DELETE ALIAS dictdb.
create alias DICTDB for database value(ldbname(i)).

/* listtable.p */
DEF INPUT PARAM c AS CHAR NO-UNDO.
FOR EACH DICTDB._File NO-LOCK,
EACH DICTDB._Field OF _File NO-LOCK:
IF _Field._Field-Name EQ c THEN
DISPLAY ldbname("dictdb") _file._file-name.
end. /* for each _file */
 
Top