DEFINE IMAGE PICTURE SIZE 10 BY 5.
DEFINE FRAME frameA picture. DEFINE VAR picfile AS CHAR. /* Find the employee record */ FIND FIRST employee WHERE FirstName EQ "John". /* Create a temporary file to hold the image */ picFile = SESSION:TEMP-DIRECTORY + "\" + employee.NAME + ".jpg". /* Copy the image from the blob field to the * temporary file with COPY-LOB code */ COPY-LOB employee.image TO FILE picFile. /* Associate the image with a button */ picture:LOAD-IMAGE(picFile) IN FRAME frameA. /* Delete the temporary file */ OS-DELETE VALUE(picFile). |