Previous Topic: Determine Which Fields Are Present

Next Topic: Retrieve Records by Key Field

Retrieve Records Directly by RID

When you know the RID of the record that you want, perhaps from an earlier &NDBADD, you can retrieve it by coding:

&NDBGET dbname RID=ridvalue FORMAT=fmtname

ridvalue is a variable containing an RID obtained elsewhere.

You can also code OPT=KGE, and so on, to retrieve a record with an RID satisfying the coded option. For example, OPT=KGT returns the record with the next-highest RID than the value passed. It is possible to simulate sequential reading by RID using this technique.