Consultor Eletrônico



Kbase P170899: 4GL/SQL: Can I prevent the SQL constraints from showing up in an incremental ( delta ) data definiti
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   03/08/2010
Status: Unverified

GOAL:

4GL/SQL: Can I prevent the SQL constraints from showing up in an incremental ( delta ) data definition file?

GOAL:

Can I automatically remove the lines from an incremental ( delta ) data definition file that were generated due to the SQL created constraints?

GOAL:

How do I remove undesired lines from any data definitions file ( .df )?

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.x

FIX:

There is no automatic way to remove the lines from an incremental ( delta ) data definition file that were generated due to SQL created constraints. There is no way to suppress the effect of DDL statements in any .delta file generated against an OpenEdge 4GL/ABL database that has been modified using SQL DDL commands.
However, one way to remove undesired lines from any .df file is to process the .df using a 4GL/ABL procedure. For example, the following FIXDF.p procedure strips certain undesired lines from the input .df file and generates a new .df file without the these lines. This procedure may be customized to remove the undesired lines generated due to the execution of SQL DDL statements against the underlying database:
/*** FIXDF.p - Strips AREA & TABLE-TRIGGER lines from .df ***/
DEFINE VARIABLE cSourceFileName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cTargetFileName AS CHARACTER NO-UNDO.
ASSIGN
cSourceFileName = "C:\OpenEdge\WRK101B\Source.df"
cTargetFileName = "C:\OpenEdge\WRK101B\Target.df".
INPUT FROM VALUE ( cSourceFileName ).
OUTPUT TO VALUE ( cTargetFileName ).
DEFINE VARIABLE cLine AS CHARACTER NO-UNDO.
REPEAT:
IMPORT UNFORMATTED cLine.
IF TRIM(cLine) BEGINS 'AREA "' OR TRIM(cLine) BEGINS 'TABLE-TRIGGER "' THEN NEXT.
PUT UNFORMATTED cLine SKIP.
END.
INPUT CLOSE.
OUTPUT CLOSE.