IBM Books

Image, Audio, and Video Extenders Administration and Programming

Filename


Image Audio Video
X X X

Returns the name of the server file that contains the contents of an image, audio, or video if the object content is stored in a file (pointed to from a database table). If the image, audio, or video is stored in a database table as a BLOB, a null value is returned.

Include file

image
dmbimage.h

audio
dmbaudio.h

video
dmbvideo.h

Syntax

>>-Filename--(--handle--)--------------------------------------><
 

Parameters (data type)

handle (DB2IMAGE, DB2AUDIO, or DB2VIDEO)
Column name or host variable that contains the handle of the image, audio, or video.

Return values (data type)

File name of the server file if object content is in a server file (VARCHAR(250)); null value if object is stored as a BLOB.

Examples

Display the file name of the video for the Robert Smith entry in the employee table:

EXEC SQL BEGIN DECLARE SECTION;
 char hvVid_fname[251];
EXEC SQL END DECLARE SECTION;
 
EXEC SQL SELECT FILENAME(VIDEO)
     INTO :hvVid_fname
     FROM EMPLOYEE
     WHERE NAME='Robert Smith';


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]