Kbase P79021: How to get the source record buffer in a BEFORE-ROW-FILL event procedure
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/4/2004 |
|
Status: Unverified
GOAL:
How to get the source record buffer in a BEFORE-ROW-FILL event procedure
FACT(s) (Environment):
OpenEdge 10.0A
FIX:
Within the event procedure for the BEFORE-ROW-FILL event on a row in a ProDataSet it is not possible to directly reference the source buffer (i.e. by simply referencing TableName.FieldName). To reference the source buffer code similar to the following must be used:
PROCEDURE BeforeRowFill:
DEFINE INPUT PARAMETER DATASET-HANDLE pDataSet.
DEFINE VARIABLE hSourceBuffer AS HANDLE NO-UNDO.
ASSIGN hSourceBuffer = pDataSet:GET-BUFFER-HANDLE("SomeTable"):DATA-SOURCE:GET-SOURCE-BUFFER(1).
MESSAGE "BeforeRowFill, Source Buffer Name = " hSourceBuffer:NAME VIEW-AS ALERT-BOX.
/* Once you have the handle to the source buffer which will be used to */
/* fill the new row you can access the fields of the source buffer by */
/* using the BUFFER-FIELD() method. */
END PROCEDURE.