Kbase P112530: How to define a callback procedure for buffer handle?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/28/2008 |
|
Status: Verified
GOAL:
How to define a callback procedure for buffer handle?
GOAL:
What are the parameters for a buffer callback procedure?
GOAL:
How to fill additional columns in a temp-table part of a prodataset?
GOAL:
How to stop dataset fill() method using callback procedures?
FACT(s) (Environment):
OpenEdge 10.x
All Supported Operating Systems
FIX:
DEFINE TEMP-TABLE ttCust LIKE customer
FIELD crowid AS ROWID
.
BUFFER ttCust:SET-CALLBACK-PROCEDURE( "After-row-fill", "callBackAfterRowFill" ).
PROCEDURE callBackAfterRowFill:
DEFINE INPUT PARAMETER DATASET-HANDLE phDataSet.
DEFINE INPUT PARAMETER DATASET-HANDLE phDataSet.
ASSIGN
phDataSet:GET-BUFFER-HANDLE( "ttCust" ):BUFFER-FIELD( "crowid" ):BUFFER-VALUE =
phDataSet:GET-BUFFER-HANDLE( "ttCust" ):DATA-SOURCE:GET-SOURCE-BUFFER(1):ROWID
NO-ERROR.
/* this will stop the fill method */ IF <something_went_wrog> THEN RETURN ERROR.
END PROCEDURE.