Differences between RECID & ROWID

Hi,

If I understand it well :

The ROWID is the position of a row of a table at anytime.

The RECID is associated to your buffer so if you do something like this :
Code:
DEFINE BUFFER BUF1 FOR CUSTOMER.
DEFINE BUFFER BUF2 FOR CUSTOMER.

FIND BUF1 WHERE BUF1.custnum = 100514 NO-LOCK NO-ERROR.

FIND BUF2 WHERE RECID(BUF2) = RECID(BUF2) NO-LOCK NO-ERROR.

/* BUF2.custnum will not be the same as BUF1 */

Best Regards,

- BobyIsProgress -
 

Cringer

ProgressTalk.com Moderator
Staff member
You should not be using RECID at all. RECID is no longer unique across the database. It is only unique in a storage area.
 

TomBascom

Curmudgeon
RECID is not specific to a buffer.

RECID is a legacy record identifier. It consists of a “dbkey” (aka block number within a storage area) plus a row number within that block.

A long time ago RECID was unique within a database. That is no longer true. It is no longer even unique within a table.

RECID is also specific to OpenEdge databases. If you are using a data server product the “other” db does not have RECIDs.

Code that uses RECID will often appear to work mostly fine until it runs in a production environment that uses multiple storage areas or data servers or table partitioning etc.
ROWID is the replacement for RECID which solves these problems. It has been in the language since at least version 8. Quite possibly a lot longer, I am too lazy to look it up.

You should not be using RECID.
 
Top