Store a comment with an image, audio, or video object by specifying the comment in the UDF request. A comment is free-form text of data type LONG VARCHAR that can be up to 32,700 bytes long. If you do not want a comment stored when you store an object, specify a null value or empty string in place of the comment. If you specify a null value, remember to cast it to a LONG VARCHAR data type.
For example, the following statements in a C application program store a comment with a video clip.
EXEC SQL BEGIN DECLARE SECTION; long hvStorageType; EXEC SQL END DECLARE SECTION; hvStorageType=MMDB_STORAGE_TYPE_EXTERNAL; EXEC SQL INSERT INTO EMPLOYEE VALUES( '128557', 'Anita Jones', DB2VIDEO( CURRENT SERVER, '/employee/videos/ajones.mpg', 'MPEG1', :hvStorageType, 'Anita''s video') /* comment */ );
The following statements in a C application program store an image without a comment.
EXEC SQL BEGIN DECLARE SECTION; long hvStorageType; EXEC SQL END DECLARE SECTION; hvStorageType=MMDB_STORAGE_TYPE_INTERNAL; EXEC SQL INSERT INTO EMPLOYEE VALUES( '128557', 'Anita Jones', DB2IMAGE( CURRENT SERVER, '/employee/images/ajones.bmp', 'GIF', :hvStorageType, Cast(NULL as LONG VARCHAR) /* no comment */ );