Consultor Eletrônico



Kbase P151071: Error 565 when saving multiple rows to a SmartDataObject
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   02/09/2009
Status: Unverified

SYMPTOM(s):

Error 565 when saving multiple rows to a SmartDataObject

** FIND FIRST/LAST failed for table . (565)

** FIND FIRST/LAST failed for table rowobjupd. (565)

No records entered into a SmartDataViewer are saved except for the first record entered.

FACT(s) (Environment):

First record entered into the SmartDataViewer is saved correctly.
Application copies data from an ActiveX grid control to a SmartDataViewer one record at a time for saving into a SmartDataObject.
SmartToolbar is not used.
Update SmartPanel is not used.
Form contains a separate ABL window with a button to save all the records entered into the ActiveX control.
Application works in Progress 9.1E.
Windows
OpenEdge 10.1B

CHANGE:

Upgraded to 10.1B.

CAUSE:

When a SmartToolbar or SmartPanel is the TableIO source for a SmartDataViewer, the ADM is able to determine whether the viewer is in Save or Update mode, and disable or enable its fields accordingly so data is not corrupted while it is being saved. The custom Save button in this application actually initiated a series of save operations in the SmartDataObject, applied one by one as each record was copied from the ActiveX control into the SmartDataViewer. The custom Save button simulated the Progress version 9 ADM SmartToolbar by publishing the updateComplete event. This worked in v9, but in the OpenEdge 10 ADM code the disabling of the object in Update mode is managed by the object itself. Because the viewer was not returned to Update mode after saving each record, the ADM did not enable the SmartDataViewer fields after the first record was saved. Because the fields were not enabled, update records were not created for next record, and the save failed with error 565.

FIX:

If possible, use the SmartToolbar to gain the full functionality of the ADM. If it is necessary to use custom controls with SmartObjects, make sure that SmartDataViewer fields are enabled before attempting to create and save a record. This can be done by running the ADM2 enableFields procedure.