Consultor Eletrônico



Kbase P126568: Index was outside the bounds of the array exception in .Net when passing back altered dataset
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/01/2008
Status: Unverified

FACT(s) (Environment):

OpenEdge 10.1B
All Supported Operating Systems

SYMPTOM(s):

.Net application passes Dataset to AppServer as an INPUT-OUTPUT DATASET-HANDLE parameter

ABL code on the AppServer modifies the Dataset and adds one or more tables to it

.Net generates a runtime exception because the returning Datasets schema does not exactly match that which was passed to the AppServer

Index was outside the bounds of the array.

CAUSE:

When passing a Dataset as an INPUT-OUTPUT parameter the schema must be the same for both sides. We use the schema passed in from the client as the schema for the returning DataSet.

FIX:

If the Dataset must be modified (i.e. tables or fields added) on the AppServer side then pass two parameters, one as INPUT and the other as OUTPUT.