Opens an xBase index file. The index file(s) of a data file in xBase format opened with the HDBOpen
function must be opened with the HDBIndex
function to be used by WINDEV or WEBDEV. If the index files are not opened, they will not be updated when the write-to-file operation is performed.
Remark: there is no need to open the data file or the index files if the file was just created by HDBCreation
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
HDBOpen("CLIENT", "CL", "C:\FICHIER\CLIENT.DBF")
HDBIndex("CLIENT", "C:\FICHIER\NOMCLI.NTX", "NomCli")
HDBIndex("CLIENT", "C:\FICHIER\TELCLI.NTX", "Telephone")
<Result> = HDBIndex(<Logical name of xBase file> , <Full name of index file> , <Key name>)
- True if the operation was performed,
- False if a problem occurred. HError is used to identify the error.
<Logical name of xBase file>: Character string
Name given to the xBase file. This file was opened by HDBOpen.
<Full name of index file>: Character string
Access path to index file and full file name (with the extension)
<Key name>: Character string
Name of index key. This parameter is mandatory for the files in .NDX, .NTX and .IDX format (indeed, the name of the key does not appear in the file). It is useless and ignored for files in .MDX format (because the key name appears in the file).
If the key is a calculated key (multiple), you must not specify all the items included the key, but any name that will be used in programming. For clarity, the name of the corresponding index file is often used.
- This function is not available when using a database via Remote Access.
- This function is not available when using a stand-alone executable.