Consultor Eletrônico



Kbase P125440: Invoking WRITE-XML on ProDataSet from GET-CHANGES = No Data in XML File
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   8/13/2007
Status: Unverified

FACT(s) (Environment):

OpenEdge 10.1B

SYMPTOM(s):

Invoking WRITE-XML on ProDataSet

DataSet obtained by calling GET-CHANGES on existing DataSet which has had changes made to it

Output from WRITE-XML shows no data

CAUSE:

The original DataSet was defined with multiple NESTED relationships and the changes made to the DataSet were made to tables other than the top-level table. All other tables had NESTED relationships underneath this table so when WRITE-XML was invoked it respected the defined relationships and consequently saw that the top-level table was not changed and ended up writing nothing out.

FIX:

To force WRITE-XML to write out all changes you must turn off the NESTED attribute for the relationships prior to invoking WRITE-XML. This can be accomplished as follows:

SomeChangeDataSet:CREATE-LIKE(SomeOriginalDataSet).

DO iCount = 1 TO SomeChangeDataSet:NUM-RELATIONS:
SomeChangeDataSet:GET-RELATION(iCount):NESTED = FALSE.
END.

SomeChangeDataSet:GET-CHANGES(SomeOriginalDataSet).

/* Now You Can Invoked WRITE-XML And Get What You Expect */