Kbase P113865: How to change the Windows style back slash in the _Filed-Trig table trigger names to a UNIX style fo
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/1/2006 |
|
Status: Unverified
GOAL:
How to change the Windows style back slash in the _Filed-Trig table trigger names to a UNIX style forward slash?
FIX:
The following code will change change the Windows style back slash in the _Filed-Trig table trigger names to a UNIX style forward slash. The code can be modified to similarly change the _File-Trig trigger names:
/* Define a temp table to store the current values in the trigger table */
DEFINE TEMP-TABLE y_Field-Trig
FIELD y_Field-Recid LIKE DICTDB._Field-Trig._Field-Recid
FIELD y_File-Recid LIKE DICTDB._Field-Trig._File-Recid
FIELD y_Field-Rpos LIKE DICTDB._Field-Trig._Field-Rpos
field y_Event LIKE DICTDB._Field-Trig._Event
field y_Proc-name LIKE DICTDB._Field-Trig._Proc-Name
field y_Override LIKE DICTDB._Field-Trig._Override
field y_Trig-Crc LIKE DICTDB._Field-Trig._Trig-Crc.
/* Populate the temp table with the current values from the trigger table */
FOR EACH DICTDB._Field-trig:
CREATE y_Field-Trig.
ASSIGN
y_Field-Trig.y_Field-Recid = DICTDB._Field-Trig._Field-Recid
y_Field-Trig.y_File-Recid = DICTDB._Field-Trig._File-Recid
y_Field-Trig.y_Event = DICTDB._Field-Trig._Event
y_Field-Trig.y_Proc-Name = DICTDB._Field-Trig._Proc-Name
y_Field-Trig.y_Override = DICTDB._Field-Trig._Override
y_Field-Trig.y_Trig-Crc = DICTDB._Field-Trig._Trig-Crc.
/* Delete existing record in the trigger table and */
DELETE DICTDB._Field-Trig.
END.
/* Rebuild trigger table records with the field name modification back Windows '\' changed to unix slash '/' */
FOR EACH y_Field-trig:
CREATE DICTDB._Field-Trig.
ASSIGN
DICTDB._Field-Trig._Field-Recid = y_Field-Trig.y_Field-Recid
DICTDB._Field-Trig._File-Recid = y_Field-Trig.y_File-Recid
DICTDB._Field-Trig._Event = y_Field-Trig.y_Event
DICTDB._Field-Trig._Proc-name = REPLACE(y_Field-Trig.y_Proc-Name, "\", "/")
DICTDB._Field-Trig._Override = y_Field-Trig.y_Override
DICTDB._Field-Trig._Trig-Crc = y_Field-Trig.y_Trig-Crc.
END.