Cleanup after using a dataset
- Last Updated: September 14, 2021
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
- DETACH-DATA-SOURCE
- EMPTY-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.
|