Consultor Eletrônico



Kbase P19631: It is necessary to commit (or undo) current changes before fetching another batch of records.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/15/2008
Status: Verified

GOAL:

It is necessary to commit (or undo) current changes before fetching another batch of records.

GOAL:

How to force the commit transaction before fetch the next batch of records

GOAL:

Next records batch cannot be retrieved with an open transaction

GOAL:

setAutoCommit property set to FALSE forces to commit the transaction before get the next batch of records

GOAL:

How to override the fetchBatch procedure in the SmartDataObject in order to force the commit transaction

FACT(s) (Environment):

Progress 9.1D

FIX:

A new batch of records cannot be retrieved if a transaction is opened.

If the setAutoCommit property is set to FALSE a new batch of records cannot be retrieved if a transaction is opened. The following example shows how to force the commitTransaction by overriding the fetchBatch procedure in the SmartDataObject:

PROCEDURE fetchBatch :
/*------------------------------------------------------------------------------
Purpose: Super Override
Parameters:
Notes:
------------------------------------------------------------------------------*/

DEFINE INPUT PARAMETER plForwards AS LOGICAL NO-UNDO.

IF DYNAMIC-FUNCTION('getRowObjectState' IN TARGET-PROCEDURE) = 'RowUpdated':U
THEN RUN commitTransaction IN TARGET-PROCEDURE.

RUN SUPER( INPUT plForwards).

/* Code placed here will execute AFTER standard behavior. */

END PROCEDURE.