Try OpenEdge Now
skip to main content
ABL Reference
ABL Syntax Reference : CREATE DATASET statement
 

CREATE DATASET statement

Creates a ProDataSet object dynamically at run time. The ProDataSet object that is created is empty.
Note: You can use the ADD-BUFFER( ) method and SET-BUFFERS( ) method to add buffers to a dynamic ProDataSet object.

Syntax

CREATE DATASET dataset-handle [ IN WIDGET-POOL widget-pool-name ]
dataset-handle
A variable of type HANDLE that represents the handle of the dynamic ProDataSet object.
IN WIDGET-POOL widget-pool-name
An expression of type CHARACTER that evaluates, at run time, to the name of the widget pool in which the dynamic ProDataSet object is created.
Note: Widget pool names are not case-sensitive.

Notes

*If you do not specify a widget pool name, the object is created in the Session unnamed widget pool (not in the closest unnamed widget pool). The object goes away when its widget pool goes away or when you delete it using the DELETE OBJECT statement.
*If the ProDataSet object serves as an OUTPUT parameter and you specify a widget pool, the widget pool must outlive the called procedure.

Example

Following is an example of how to create a dynamic ProDataSet object for Orders and their Orderlines:
DEFINE VARIABLE hDset AS HANDLE NO-UNDO.
DEFINE VARIABLE hRel AS HANDLE NO-UNDO.

CREATE DATASET hDset.

hDset:SET-BUFFERS(BUFFER ttOrder:HANDLE, BUFFER ttOrderLine:HANDLE).

hRel = hDset:ADD-RELATION(BUFFER ttOrder:HANDLE, BUFFER ttOrderLine:HANDLE,
  "OrderNum,OrderNum").

See also

ProDataSet object handle, DEFINE DATASET statement