Access a member buffer of a ProDataSet
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Syntax
Temp-tables in a ProDataSet are normally accessed through their buffers.
This is largely because, while a temp-table can possibly be a part of more than one
ProDataSet, a buffer must be specifically associated with a single ProDataSet. The
ProDataSet accesses its member temp-tables through the buffers for them. In some cases, as
explained here, you can use either a temp-table handle or its buffer handle to access the
table, but in general all access is through the buffer. This is important to keep in mind,
especially because each static temp-table has by default a buffer of the same name, so the
distinction can be confusing. Always remember that TEMP-TABLE
ttOrder:HANDLE and BUFFER ttOrder:HANDLE are two
different handles that point to different, though related, objects. This topic explains the
ProDataSet methods and attributes that give you access to the buffers of a ProDataSet, and
the buffer attributes and methods for those buffers.
In order to access the member
buffers in a ProDataSet, you use the GET-BUFFER-HANDLE method,
which accepts either a numeric index or a buffer name, as shown
in the following syntax:
|
In this method:
- buffer-index-expression is the one-based index of the member-buffer in the ProDataSet.
- buffer-name-expression is a character expression that evaluates to the name of a buffer in the ProDataSet.
GET-BUFFER-HANDLE returns
the buffer handle of the member buffer, or the Unknown value (?) if
the buffer cannot be found.
To find out how many temp-tables
there are in a ProDataSet, you use the NUM-BUFFERS attribute,
as shown in the following syntax:
|
Of course, if the ProDataSet definition is local to the procedure seeking the buffer handle, you can simply get the handle directly if you know its name without going through the ProDataSet, as shown in the following syntax:
|
For example, the buffer-name-expression form is useful if you have only the handle to the ProDataSet available and need to locate one of its buffers by name to act on it, to set a callback procedure, or to attach a Data-Source.
The buffer handle provides the same access to the data in the temp-table as any other usage of a buffer handle.
The member buffers of a ProDataSet
point back to the ProDataSet handle using the DATASET attribute,
as shown in the following syntax:
|
This returns the ProDataSet object handle of a member buffer object.