Copying between database records and MEMPTR
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Copying a database record to and from a MEMPTR variable
relies on the RAW-TRANSFER statement. This statement
allows you to copy a whole database record buffer to a RAW variable
or to copy a RAW variable to a database record
buffer.
To store a database record in a MEMPTR variable:
- Copy
the record buffer to a
RAWvariable using theRAW-TRANSFERstatement. - Assign the
RAWvariable to theMEMPTRvariable or to the specified position in theMEMPTRvariable using thePUT-BYTESstatement.
To retrieve
a database record from a MEMPTR variable:
- Assign the
MEMPTRvariable to aRAWvariable or use theGET-BYTESfunction to copy the specified bytes from theMEMPTRto theRAWvariable. - Copy the
RAWvariable to the record buffer using theRAW-TRANSFERstatement.