IBM Books

Image, Audio, and Video Extenders Administration and Programming

QbQueryNameSearch


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 its name. The results, which include the image handles and QBIC search scores, are stored in a result array in the client memory. The results are sorted according to their scores.

Notes:

  1. EEE Only: QbQueryNameSearch is not supported in a partitioned database environment.

  2. QbQueryNameSearch will be deprecated in future releases for non-partitioned database environments. To save a query, you should use QbQueryGetString to get the query string and save that string for later use in your application.

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

Parameters

qName (in)
The name 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 you allocate the buffer large enough to hold all the results you expect.

Error codes

qbiECinvalidQueryHandle
The query objecthandle you specified does not reference a valid query obje.

Examples

Run the query FSHAVGCOL against 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 = QbQueryNameSearch("fshavgcol",
       "employee", "picture",
       6, 0, qbiArray, &count, &returns);


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