xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

HS_Set()

Defines a search string for subsequent HS_Next() calls.

Syntax

HS_Set( <nHsxHandle>, <cSearch> ) --> nIndexEntry

Arguments

<nHsxHandle>
This is the numeric file handle of the HiPer-SEEK index file to find <cSearch> in. The file handle is returned from HS_Open() or HS_Create().
<cSearch>
This is a character string holding the search string for subsequent HS_Next() calls.

Return

The function returns numeric 1 whan the search string is successfully defined, or a negative number as error code:

Error codes of HS_Set()
ValueDescription
-4Error while attempting to seek during buffer flushing.
-6Write error during buffer flushing.
-13HiPer-SEEK index file has no index entries.
-16Invalid parameters are passed.
-18Illegal HiPer-SEEK index file handle.

Description

HS_Set() defines the search string for a new Find operation in a HiPer-SEEK index file. The function prepares all internal parameters but dos not initiate a search. This must be accomplished with subsequent calls to the HS_Next() function which can be called repeatedly until no more matches are found.

Info

See also:HS_Next()
Category: Database functions , HiPer-SEEK functions , Index functions , xHarbour extensions
Source:rdd\hsx\hsx.c
LIB:lib\xhb.lib
DLL:dll\xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe