Kbase 20703: How to Use Hidden Tables in the AppBuilder.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
GOAL:
How to access hidden tables in the AppBuilder.
FIX:
In the Progress Data Dictionary, the hidden tables of a database (the metaschema tables) may be accessed by using the menu item View > Show Hidden Files. This feature is not available in the AppBuilder, yet it is sometimes necessary to build, for instance, a SmartDataObject or a SmartDataViewer against one of the Virtual System Tables (VST).
In order to work with hidden tables in the AppBuilder, use the following program to toggle the _Hidden field of the _File table that makes it visible or not:
DEFINE VARIABLE iSysTblFrom AS INTEGER EXTENT 2 INIT [-1,-16385] NO-UNDO.
DEFINE VARIABLE iSysTblTo AS INTEGER EXTENT 2 INIT [-16384,-16423] NO-UNDO.
DEFINE VARIABLE iWhichTables AS INTEGER
VIEW-AS RADIO-SET VERTICAL
RADIO-BUTTONS "Metadata Tables", 1,
"Virtual System Tables", 2
SIZE 25 BY 2.02 NO-UNDO.
DEFINE VARIABLE lHidden AS LOGICAL
VIEW-AS RADIO-SET VERTICAL
RADIO-BUTTONS "Hidden", TRUE,
"Not Hidden", FALSE
SIZE 25 BY 2.02 NO-UNDO.
DEFINE BUTTON bGo LABEL "Set" SIZE 25 BY 1.
DEFINE FRAME ChooseFrame
iWhichTables LABEL "Table to set"
lHidden LABEL "State"
bGo AT 25
WITH SIDE-LABELS THREE-D.
ON 'CHOOSE':U OF bGo
DO:
ASSIGN iWhichTables
lHidden.
RUN setTable (iSysTblFrom[iWhichTables],
iSysTblTo[iWhichTables],
lHidden
).
END.
ENABLE ALL WITH FRAME ChooseFrame.
WAIT-FOR CLOSE OF THIS-PROCEDURE.
PROCEDURE setTable:
DEFINE INPUT PARAMETER piFrom AS INTEGER NO-UNDO.
DEFINE INPUT PARAMETER piTo AS INTEGER NO-UNDO.
DEFINE INPUT PARAMETER plHidden AS LOGICAL NO-UNDO.
FOR EACH _File WHERE _File._File-number GE piTo
AND _File._File-number LE piFrom:
IF _File._File-Number < -80
AND _File._File-Number > -120 THEN /* Excl. SQL Catalog Tables */
NEXT.
ASSIGN _File._Hidden = plHidden.
END.
END.