IBM Books

Image, Audio, and Video Extenders Administration and Programming

QbQuerySetFeatureData


Image Audio Video
X    

Sets the source of the image data for a feature in a query object. You can set the data source only after adding a feature to a query object. The data source can be an image in a user table, file, or workstation buffer. You can use a client file or workstation buffer as a data source only in a non-partitioned database environment. In addition, you can explicitly specify data for the average color or histogram color feature.

Use the QbQueryStringSearch following setting the source for image data in a server file using QbQuerySetFeatureData. QbQuerySearch does not use the source for image data from a server file set with QbQuerySetFeatureData.

The following features are supplied with the Image extender:

Authorization

None.

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

libdmbqqry.sl (HP-UX)

libdmbqqry.so (Solaris)

Include file

dmbqbapi.h

Syntax

SQLRETURN QbQuerySetFeatureData(
      QbQueryHandle qObj,
      char *featureName,
      QbImageSource* imgSource
      );

Parameters

qObj (in)
The handle of the query object.

featureName (in)
The name of the feature to be set.

imgSource (in)
The pointer to the image source structure. If you specify 0 (NULL) for imgSource, it means that the information should not be changed in the feature. See Using data source structures for more information.

Error codes

qbiECinvalidQueryHandle
The query object handle you specified does not reference a valid query object.

qbiECunknownFeatureClass
The feature you specified is not a recognized feature class name.

qbiECinvalidFeatureClass
The feature you specified is not a valid name format.

qbiECfeatureNotPresent
The feature you specified is not a member of the query object.

qbiECfileUnreadable
The image source file cannot be found or read.

Examples

Set the data source for the histogram color feature in a query object. The data source for the feature is a file on the client workstation:

#include <dmbqbapi.h>
 
QbQueryHandle qoHandle;
QbImageSource imgSource;
 
imgSource.sourceType = qbiSource_ClientFile;
strcpy(featureName, "QbColorHistogramFeatureClass");
strcpy(imgSource.clientFile, "/tmp/image.gif");
 
rc = QbQuerySetFeatureData(qoHandle, featureName, &imgSource);


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