IBM Books

Image, Audio, and Video Extenders Administration and Programming

QbQuerySearch


Image Audio Video
X    

Searches the QBIC catalog for images that match the search criteria contained in a query object. The query object is identified by a query object handle. The results, which include the image handles and their QBIC search scores, are stored in a result array in the client memory. They are sorted according to their scores.

Authorization

Select

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 QbQuerySearch(
      QbQueryHandle qObj,
      char *tableName,
      char *columnName,
      SQLINTEGER maxReturns,
      QbQueryScope* scope,
      SQLINTEGER resultType,
      SQLINTEGER* count,
      QbResult* returns
      );

Parameters

qObj (in)
The handle of the query object.

tableName (in)
The name of the table containing the column of images you want to search.

columnName (in)
The name of the image column. The column must be enabled for image data.

maxReturns (in)
The maximum number of images you want returned.

scope (in) (Reserved)
Must be set to 0 (NULL).

resultType (in) (Reserved)
Must be set to qbiArray.

count (out)
The pointer to the number of images returned. If zero is returned, make sure the image column is cataloged for all the features in the query object.

returns (out)
The pointer to the array of QbResult structures that hold the returned results. Make sure that you allocate the buffer large enough to hold all the results that you expect.

Error codes

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

Examples

Query the cataloged images in the picture column of the employee table. Make sure that no more than six images are returned:

#include <dmbqbapi.h>
 
rc = QbQuerySearch(qHandle, "employee",
       "picture", 6, 0, qbiArray,
       &count, &returns);


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