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
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.