Cleanup after using a dataset
- Last Updated: January 22, 2026
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
DETACH-DATA-SOURCEEMPTY-DATASET
DETACH-DATA-SOURCE
Generally, you should detach data-sources when you are done using them, unless you plan to populate or update the dataset later in the procedure.
The syntax to detach a data-source is:
|
For example:
|
EMPTY-DATASET
If you plan to empty and populate a dataset again, or if you no longer
need the data in your dataset in memory, use the EMPTY-DATASET method to empty a dataset object of all records in its
associated temp-tables.
Once the dataset is emptied using this method, you may continue to use the dataset in your application.
The syntax to use the EMPTY-DATASET
method is:
|
In the following example code, the EMPTY-DATASET method is called on the dsOrderOrderline dataset, removing all records. The structure of the
dataset is left intact so it can be populated again.
|
See also
DETACH-DATA-SOURCE( ) method in ABL Reference
EMPTY-DATASET( ) method in ABL Reference
Other ProDataSet methods in Use ProDataSets