xHarbour Reference Documentation > Function Reference |
Opens a HiPer-SEEK index file.
HS_Open( <cFileName> , ; <nBufferSize>, ; <nOpenMode> ) --> nHsxHandle
Open modes for HiPer-SEEK index files
Value | Description |
---|---|
0 | READ-WRITE + SHARED |
1 | READ-WRITE + EXCLUSIVE |
2 | READ-ONLY + SHARED |
3 | READ-ONLY + EXCLUSIVE4 |
The function returns a numeric value greater or equal to zero when the HiPer-SEEK index file can be opened. This value is a handle to the HiPer-SEEK index file and must be used with other HS_*() functions.
A negative return value indicates an error condition:
Error codes of HS_Open()
Value | Description |
---|---|
-2 | Not enough memory or <nBufferSize> is too large. |
-5 | Read error while reading. |
-10 | File cannot be opened. |
-16 | Invalid parameters are passed. |
-17 | No more file handles available. |
-20 | File cannot be locked. |
-21 | Lock table exhausted. |
-22 | File cannot be unlocked. |
HS_Open() opens an existing HiPer-SEEK index file and returns a file handle to it. This handle must be preserved and passed to HS_Add() when new index entries should be added, or to HS_Set() and HS_Next() to perform a search.
See also: | HS_Add(), HS_Close(), HS_Create(), HS_Next(), HS_Set() |
Category: | Database functions , HiPer-SEEK functions , Index functions , xHarbour extensions |
Source: | rdd\hsx\hsx.c |
LIB: | lib\xhb.lib |
DLL: | dll\xhbdll.dll |
http://www.xHarbour.com