Kbase P88357: Browse exhibits erratic behavior after a call to an external procedure with a temp-table as INPUT-OU
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/07/2004 |
|
Status: Unverified
SYMPTOM(s):
Browse exhibits erratic behavior after a call to an external procedure with a temp-table as INPUT-OUTPUT PARAMETER.
The browse is based on the TEMP-TABLE being passed as INPUT-OUTPUT PARAMETER.
CAUSE:
When the TEMP-TABLE comes back from its travel. Its RECID's are not the same as when it left the main procedure. And the query is not reopened.
FIX:
On return from the external procedure, take the following steps to keep the browse in sync with its previous state:
1. Reopen the query.
2. Refind the record you were at before calling the external program.
3. Reposition your query to that record.
That is done using code similar to the following:
...
...
RUN dCustBrowse.w
(INPUT vCustNum,
INPUT-OUTPUT TABLE ttCustomer).
/******** Add the following code to reposition the browse *********/
/* Reopen the Query */
OPEN QUERY BROWSE-Customer FOR EACH ttCustomer NO-LOCK.
/* Find the record that was selected before the call to the external procedure */
FIND ttCustomer WHERE ttCustomer.CustNum = vCustNum.
/* Reposition the query that record */
REPOSITION BROWSE-Customer TO ROWID ROWID(ttCustomer) NO-ERROR.