Try OpenEdge Now
skip to main content
ABL Data Types Addenda
Using large objects in ABL : Modifying BLOB data
 

Modifying BLOB data

The following example places a new 4 byte value at a specified offset in the BLOB record. In this example, employee.image is a BLOB field defined for the employee table that contains the employee's picture:
DEFINE VAR newValue AS INT.
DEFINE VAR offset AS INT INITIAL 3.
DEFINE VAR m1 AS MEMPTR.

/* Want to update a 4 byte value in the BLOB */
SET-SIZE(m1) = 4.
FIND FIRST employee.
COPY-LOB m1 TO employee.image OVERLAY AT offset.
SET-SIZE(m1) = 0.