Kbase P75409: Error 138 in PretransactionValidate and RowObjectValidate when saving a record withn a HTML mapped w
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  14/06/2004 |
|
Status: Unverified
FACT(s) (Environment):
WebSpeed 3.1D
SYMPTOM(s):
Error 138 in PretransactionValidate and RowObjectValidate when saving a record withn a HTML mapped webObject.
** bRowObjUpd record not on file. (138)
CAUSE:
BUG# 20040406-006
CAUSE:
In the SDO in PreTransactionValidate, he has the following code:
IF ROWOBJECT.NAME = "" THEN RETURN "Name Cannot be Blank".
This is causing error (138) appearing in wsbroker1.server.
** bRowObjUpd record not on file. (138)
The error occurs when you enter a blank value for the name field in the viewer and you press after the message "Name Cannot be Blank" on NEXT (button) for getting next record and you do an update to the next record, (After committing the update).
Note that the error also occurs if you place the code in RowObjectValidate or at other levels of validation.If placed at the Field name validation level. For example if create a procedure called NameValidate in the SDO.
FIX:
This is not a bug.
The "Working with version 9 ADM: Building and Using SmartDataObjects"
Whitepaper explains the various ways to add validation to the SDO. There is no difference in Webspeed.
The error message is confusing, but I just realized that the code is referencing the client side temp-table. The code in the example should work if put in RowObjectValidate.
Code in the transactionValidate hooks must check against the update RowObjUpd temp-table.
It must also do this with a for each and use the RowMod to filter the right records.
for each rowobjupd where RowObjUpd.RowMod = 'U'
or RowObjUpd.RowMod = 'A'
or RowObjUpd.RowMod = 'C':
IF RowObjUpd.Name = "" then
RETURN "Name Cannot be Blank".
end.