File Buffers and DDO-Field Buffers
When a table in a database is opened, a global file buffer is created which contains the field values for a record. Record finds and clears move data from the table to this buffer. Saves move data from the buffer to the table. Global variables, called file.field variables, are defined that provide program access to these buffers, allowing programmers to access and change data about a current record.
// Move from file buffer to a variable
Move Customer.Name to sName
// Move from variable to the file buffer
Move sName to Customer.Name
Data Dictionary objects maintain local buffers, which hold information about the Data Dictionary object’s current record. These are called DDO-Field Buffers. These local buffers allow applications to support multiple Data Dictionary objects that use the same table.
// Move from DDO-Field buffer to a variable
Get Field_Current_Value of hoDDO Field Customer.Name to sName
// Move from variable to the DDO-Field buffer
Set Field_Changed_Value of hoDDO Field Customer.Name to sName
There will be times when you want to interact directly with the global file buffers and times when you want to interact with the DDO-Field buffers. This is discussed in detail in Understanding File Buffers and DDO Field Buffers.