IBM Books

Image, Audio, and Video Extenders Administration and Programming

DBiIsFileReferenced


Image Audio Video
X    

Returns a list of table entries in image columns that refer to a specified file. The application must be connected to a database before calling this API.

It is important that you free up the resources that are allocated by this API after calling it. Specifically, you must free up the filelist data structure as well as the filename field in each entry in the filelist.

Authorization

SELECT privilege on enabled image columns in all searched user tables and associated administrative support tables

Library file
OS/2 and Windows AIX, HP-UX, and Solaris
dmbimage.lib libdmbimage.a (AIX)

libdmbimage.sl (HP-UX)

libdmbimage.so (Solaris)

Include file

dmbimage.h

Syntax

long DBiIsFileReferenced(
      char *tableName,
      char *fileName,
      long *count,
      FILEREF *(*tableList)
      );

Parameters

tableName (in)
A qualified, unqualified , or null table name. If a table name is specified, that table is searched for references to the specified file. If a null value is specified, all tables owned by the current user ID are searched.

fileName (in)
The name of the referred to file.

count (out)
The number of entries in the output list

tableList (out)
A list of table entries that refer to the specified file

Error codes

MMDB_SUCCESS
API call processed successfully.

MMDB_RC_NOT_CONNECTED
Application does not have valid connection to a database.

MMDB_RC_MALLOC
System cannot allocate memory to return the results.

Examples

List the entries in image columns of the employee table that refer to file /images/ajones.bmp:

#include <dmbimage.h>
long idx;
 
rc = DBiIsFileReferenced(NULL,
       "/images/ajones.bmp",
       &count, &tableList);


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