Kbase P63834: updateData and deleteData Fail to Find Correct Record With AppServer
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
FACT(s) (Environment):
Dynamics
SYMPTOM(s):
updateData and deleteData Fail to Find Correct Record With AppServer
Code which ran startsdo then ran an updateData or deleteData call however this failed over the AppServr as it stated the _obj record could not be found. All worked ok client/server
CAUSE:
Need to ensure the initializeObject was run in the SDO after it was started, for example the following code raises the _obj record not found error:
CREATE part.
ASSIGN
part.ITEM_code = ivm_item.ITEM_code
part.item_name = "Testing updateData via AppServer"
part.ITEM_obj = ivm_ITEM.ITEM_obj.
MESSAGE "obj of item found -" ivm_ITEM.ITEM_obj VIEW-AS ALERT-BOX.
RUN startDataObject IN gshRepositoryManager
(INPUT "ivmitfullo",
OUTPUT hSDO)
NO-ERROR.
{get DataDelimiter cDelim hSDO}.
DYNAMIC-FUNCTION("addQueryWhere":U IN hSDO,
"ivm_item.item_obj = '" + STRING(part.ITEM_obj) + "'", "", "").
MESSAGE DYNAMIC-FUNCTION("getQueryString" IN hSDO) VIEW-AS ALERT-BOX.
ASSIGN
cFieldNames = "item_obj,item_code,item_name"
cRequestData = STRING(part.ITEM_obj) + cDelim +
STRING(part.ITEM_code) + cDelim +
STRING(part.ITEM_name)
cCurrentData = STRING(ivm_item.ITEM_obj) + cDelim +
STRING(ivm_item.ITEM_code) + cDelim +
STRING(ivm_item.ITEM_name).
RUN updateData IN hSDO
(INPUT cFieldNames,
INPUT cCurrentData,
INPUT-OUTPUT cRequestData,
OUTPUT cError)
NO-ERROR.
However if the call to initialzieObject is added after the sdo is started then all works correctly:
RUN startDataObject IN gshRepositoryManager
(INPUT "ivmitfullo",
OUTPUT hSDO)
NO-ERROR.
RUN initializeObject in hSDO.
{get DataDelimiter cDelim hSDO}.
FIX:
Add a call to initializeObject after startSDO