When the source content for an image, audio, or video object update is in a server file, specify the file path as the content argument to the UDF. For example, the following statement in a C application program updates an image in a database. The image content is in a server file. The database points to the server file. The source for the update is also in a server file.
EXEC SQL BEGIN DECLARE SECTION; long hvStorageType; EXEC SQL END DECLARE SECTION; hvStorageType=MMDB_STORAGE_TYPE_EXTERNAL; EXEC SQL UPDATE EMPLOYEE SET PICTURE=CONTENT( PICTURE, /* image handle */ '/employee/newimg/ajones.bmp', /* source file */ 'ASIS', :hvStorageType) WHERE NAME='Anita Jones';
Specify the correct path: When you update an object whose source is in a server file, you can specify the file's fully qualified name or a relative name. If you specify a relative name, you need to ensure that the appropriate environment variables in the DB2 server includes the correct path for the file. For information about setting these environment variables, see Appendix A, Setting environment variables for DB2 extenders.