Kbase P5653: How to get the recid from a row in a SDB
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/11/2002 |
|
Status: Unverified
GOAL:
How to get the recid from a row in a SDB
FIX:
You can add this code in the value-changed trigger of the SmartDataBrowse, so anytime you click on a row you will get the RECID of that row. Be aware that the value returned is an hexadecimal value, so you will need to convert it into an integer to use the RECID function to retrieve the record from the database.
DEFINE VARIABLE hFld AS HANDLE NO-UNDO.
DEFINE VARIABLE i AS INT NO-UNDO.
ASSIGN hBuffer = DYNAMIC-FUNCTION ('getQueryRowObject':U).
DO i = 1 TO hBuffer:NUM-FIELDS:
hFld = hBuffer:BUFFER-FIELD(i).
IF hFld:NAME = "rowIdent" THEN
MESSAGE hFld:BUFFER-VALUE.
END.