Documentation
(C) IBM Corp. 1996, 1999

Text Extender: Administration and Programming

DesGetBrowseInfo

Purpose

Receives a search argument for searching through text identified by a handle. It returns a pointer to browse information needed by DesStartBrowseSession for highlighting the found terms.

Syntax

DESRETURN
  DesGetBrowseInfo
   (SQLHDBC              hdbc,
    SQLCHAR              *pHandle,
    DESUSHORT            HandleLength,
    char                 *pSearchArgument,
    DESSMALLINT          ArgumentLength,
    DESBROWSEINFO        *pBrowseInfo,
    DESMESSAGE           *pErrorMessage);

Function arguments

Table 10. DesGetBrowseInfo arguments
Data Type Argument Use Description
SQLHDBC hdbc input A database connection handle.
SQLCHAR * pHandle input Pointer to a handle that has been extracted from the database.
DESUSHORT HandleLength input Length of pHandle. DES_NTS cannot be used here.
char * pSearchArgument input Pointer to the text search argument that specifies the information that you want to find.
DESSMALLINT ArgumentLength input Either the length of pSearchArgument (not including a null byte terminator), or DES_NTS.
DESBROWSEINFO * pBrowseInfo output Pointer to browse information containing the data needed to browse a text document. This pointer is passed to DesStartBrowseSession.
DESMESSAGE * pErrorMessage output Implementation-defined message text. If an error occurs, Text Extender returns an error code and an error message. The application program allocates the buffer of size DES_MAX_MESSAGE_LENGTH. If pErrorMessage is the null pointer, no error message is returned.

Usage

Your application program must establish a connection to the database before it calls DesGetBrowseInfo.

For the pointer to the search argument, char* is used rather than SQLCHAR*. This is because it is possible that the parameter value may not come from the database.

For the mapping between the SQL data types and C data types, you must use the SQL symbolic name SQL_VARBINARY for a handle. The type of host variables pointing to the C representation of Handle values is SQLCHAR*.

Text Extender allocates storage for the browse information. The application program must free the storage and related resources by calling DesFreeBrowseInfo.

Because Handle values are bit data and contain several '\0' characters, you must specify the length of pHandle.

The search argument in pSearchArgument is described in Chapter 10, Syntax of search arguments.

Return codes

RC_SUCCESS
RC_NO_BROWSE_INFO
 
RC_ALLOCATION_ERROR
RC_FILE_IO_PROBLEM
RC_INTERNAL_ERROR
RC_INVALID_PARAMETER
RC_PARSER_INVALID_ESCAPE_CHARACTER
RC_PARSER_INVALID_USE_OF_ESCAPE_CHAR
RC_PARSER_SYNTAX_ERROR
RC_SE_COMMUNICATION_PROBLEM
RC_SE_EMPTY_INDEX
RC_SE_EMPTY_QUERY
RC_SE_FUNCTION_DISABLED
RC_SE_FUNCTION_IN_ERROR
RC_SE_INCORRECT_HANDLE
RC_SE_INDEX_DELETED
RC_SE_INDEX_NOT_ACCESSIBLE
RC_SE_INDEX_SUSPENDED
RC_SE_INSTALLATION_PROBLEM
RC_SE_IO_PROBLEM
RC_SE_MAX_NUMBER_OF_BUSY_INDEXES
RC_SE_MAX_OUTPUT_SIZE_EXCEEDED
RC_SE_NOT_ENOUGH_MEMORY
RC_SE_PROCESSING_LIMIT_EXCEEDED
RC_SE_QUERY_TOO_COMPLEX
RC_SE_SERVER_BUSY
RC_SE_SERVER_CONNECTION_LOST
RC_SE_SERVER_NOT_AVAILABLE
RC_SE_UNEXPECTED_ERROR
RC_SE_UNKNOWN_INDEX_NAME
RC_SE_UNKNOWN_SERVER_NAME
RC_SE_WRITE_TO_DISK_ERROR
 
Warnings: The following return codes indicate that the function has returned a result, but it may not be as expected.
 
RC_SE_CONFLICT_WITH_INDEX_TYPE
RC_SE_DICTIONARY_NOT_FOUND
RC_SE_STOPWORD_IGNORED
RC_SE_UNKNOWN_SECTION_NAME
RC_SE_DOCMOD_READ_PROBLEM

Restrictions

This function can be called only after you have made a connection to a database and used a Text Extender UDF to extract a handle from the database.


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