Consultor Eletrônico



Kbase P153264: Fill event handler fails for ProDataSets created from an XSD schema
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/25/2009
Status: Verified

SYMPTOM(s):

Fill event handler fails for ProDataSets created from an XSD schema


Parameters for procedure <name> (table <name> and table <name>) do not match. (12311)


By-REFERENCE Parameters for procedure <name> (table <name> and table <name>) have indexes that do not match. (12312)

FACT(s) (Environment):

ProDataSet is created from an XSD schema.
The callback procedure associated to the ProDataSet FILL event has a static dataset input parameter defined
DEFINE INPUT PARAMETER DATASET FOR <dataset>

All Supported Operating Systems
OpenEdge 10.x

CAUSE:

This is an expected behavior.

The issue is that when we pass the ProDataSet as parameter, we look at the temp-tables definitions and compare them to make sure they match. The comparison is done by the field RPOS. WRITE-XMLSCHEMA writes the fields based on the field's order, and when you load it into a dynamic ProDataSet, the RPOS values will not match because the table in the database does not have the same order for Order and RPOS.
So in reality the temp-tables are NOT the same hence the error.


FIX:

Define the static temp-table LIKE-SEQUENTIAL instead of LIKE, which will then create the temp-table using the field's order and not rpos, which is the default.

You may have issues with the order of the indexes too, which could give error (12312). You can define the indexes manually in that case.

If you use a dataset-handle parameter in the event handler instead of a static dataset parameter this also prevents the errors.

e.g. DEFINE INPUT PARAMETER DATASET-HANDLE hDataset.