Consultor Eletrônico



Kbase P133561: Errors using COPY-TEMP-TABLE to copy temp-table created from XML to temp-table created using CREATE-
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   23/07/2008
Status: Unverified

SYMPTOM(s):

Errors using COPY-TEMP-TABLE to copy temp-table created from XML to temp-table created using CREATE-LIKE

COPY-TEMP-TABLE requires <source-name> and <target-name> columns to match exactly unless the fourth loose-mode parameter is passed as TRUE. (12303)

FACT(s) (Environment):

CREATE-LIKE creates temp-table fields in order of position
All Supported Operating Systems
OpenEdge 10.1x
OpenEdge Language Category: XML
OpenEdge Language Category: ProDataSets

CAUSE:

When creating a temp-table using the CREATE-LIKE method the order in which the fields are created is by _field-rpos. When creating a temp-table from an XML file, using READ-XML, the temp-table fields are created in the order they are specified in the file.
The COPY-TEMP-TABLE method expects field definitions to be in the same order in both temp-tables and, if they're not, returns an error.

FIX:

This is expected behavior. To work around the problem in releases earlier than 10.1C you must manually copy the temp-table and indices using ADD-FIELDS-FROM and ADD-NEW-INDEX, ADD-INDEX-FIELD, etc.
In 10.1C and later you can use the CREATE-LIKE-SEQUENTIAL method to cause the fields to be added to the temp-table in order of _order.