![]() ![]()
|
CREATE BUFFER statement
Creates a dynamic buffer object.
Syntax
handleFOR TABLEtable-name|table-handle|buffer-handle
A character expression (table-name) that evaluates to a unique database table name or static temp-table name, a temp-table handle (table-handle), or to an existing buffer object handle (buffer-handle), each of which can specify the record source for which to create the buffer object.Iftable-nameis ambiguous, you must qualify the database table name with a database name or rename the temp-table. Otherwise, if the database table exists in multiple connected databases, the AVM creates the buffer in the first connected database.BUFFER-NAMEbuffer-nameIN WIDGET-POOLwidget-pool-nameExamplesThe following example runs the query “for each customer” dynamically against the
Sports2000database using a purely dynamic buffer with no compile time references at all:
The following code fragment shows several different ways you can create an alternate dynamic buffer for a static temp-table. Note the notation
BUFFER tt1:HANDLEandTEMP-TABLE tt1:HANDLEfor accessing the default buffer object handle and temp-table object handle, respectively, for the static temp-table,tt1:
Notes
- If the character expression,
table-name, identifies a temp-table defined as REFERENCE-ONLY, the statement setshandleto an unbound object that cannot function as a buffer object. To create a valid buffer object for such a table, use FOR TABLEtable-handleorbuffer-handleinstead.- Unless you need to use an alternate buffer, the most economical and cleanest way to obtain a buffer object handle for a table is to retrieve the handle for its default buffer. For example:
See also
![]() |
OpenEdge Release 10.2B
|
![]() ![]()
|