Special dynamic buffer considerations
- Last Updated: July 17, 2023
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
When you use dynamic buffers, there are a few special rules that you need to be aware of:
- You can define a delete validation expression for a table in the Data Dictionary
when you define your database. Although this is not recommended in new
applications, if you have done this, the AVM is unable to verify whether the
delete expression is true or not when you use a dynamic buffer for the table. It
therefore disallows any
BUFFER-DELETEoperation on the table. - It is important that you use the
BUFFER-RELEASEmethod to release a dynamic buffer when you are done using it, especially if you have written to the buffer. This is true of static buffers as well, where you could use the staticRELEASEstatement. But because there is no inherent record scoping for dynamic buffers, a record release might be postponed indefinitely if you don’t handle it yourself. - A dynamic buffer has the same scope as the widget pool in which it was created.
This means that the AVM automatically deletes a dynamic buffer object only when
it deletes the widget pool. To delete a dynamic buffer yourself, use the
DELETE OBJECTstatement, as the preceding example shows. - If you place the phrase
BUFFERname anywhere in a procedure file, where name represents the name of a table, not necessarily the name of a buffer you defined using aDEFINE BUFFERstatement, the AVM scopes the name as it would a free reference to the buffer.