PreviousNextIndex

FIND-BY-ROWID( ) method

Locates the record with the rowid you specify, then moves the record into the buffer.

Return type: LOGICAL

Applies to: Buffer object handle

Syntax
FIND-BY-ROWID ( rowid 
  [ ,
    { SHARE-LOCK | EXCLUSIVE-LOCK | NO-LOCK }
    [ , NO-WAIT ]
  ] ) 

rowid
SHARE-LOCK | EXCLUSIVE-LOCK | NO-LOCK
NO-WAIT

The FIND-BY-ROWID method returns TRUE if it finds the record, and FALSE if it does not.

The following is an example:

DEFINE VARIABLE bh AS HANDLE NO-UNDO. 
DEFINE VARIABLE r  AS ROWID  NO-UNDO. 
r = ... /* ROWID from some parameter */ 
bh = BUFFER CUSTOMER:HANDLE. 
bh:FIND-BY-ROWID(r). 

Note: The FIND-BY-ROWID method corresponds to a FIND statement of the form FIND buffer WHERE ROWID ( buffer ) = rowid ..., etc. That is, triggers are honored, and the default lock mode is SHARE-LOCK. One difference, however, is that the FIND-BY-ROWID method does not raise an error if it cannot find the record.

OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex