Purpose
Receives a browse session pointer, a handle, and an option (DES_EXTENDED or DES_FAST) indicating whether the text document should be analyzed with or without the use of a dictionary. It prepares the text document that corresponds to the handle to get the document text and highlighting information, and it returns a document handle that is used for iteratively calling DesGetMatches.
Syntax
DESRETURN DesOpenDocument (DESBROWSESESSION BrowseSession, SQLCHAR *pHandle, DESUSHORT HandleLength, DESMATCHMODE MatchMode, DESHANDLE *pDocumentHandle, DESMESSAGE *pErrorMessage);
Function arguments
Table 13. DesOpenDocument arguments
Usage
DES_FAST and DES_EXTENDED refer to the use of linguistic processing for finding which terms to highlight in the browsed text. See Linguistic processing for browsing for more information. Specify DES_FAST to use basic text analysis, and DES_EXTENDED to use extended matching.
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 TextHandle values is SQLCHAR*.
Text Extender allocates storage for the browse information. The application program must free this storage and related resources by calling DesFreeBrowseInfo.
Because TextHandle values are bit data and contain several '\0' characters, you must specify the length of pHandle.
The caller must have read access to the table containing the text document referred to by pHandle.
Return codes
Restrictions
This function can be called only after you have started a browse session by calling DesStartBrowseSession.