PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Corrupted index
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
HCheckIndex (Function)
In French: HVérifieIndex
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
Checks whether the data found in the index file (.NDX file) properly refers the data found in the data file (.FIC file). This function applies to the HFSQL data files (Classic or Client/Server) only.
HFSQL Client/Server The HFSQL Client/Server data file is automatically locked in write mode during the check.
Reminder: An index is corrupted when one of the referenced records is not the expected one. In this case, the data file must to be reindexed.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 19 and later
Android This function is now available for the Android applications that use data files in HFSQL format.
Android Widget This function is now available in Android Widget mode.
Java This function is now available for the Java applications.
New in version 19
Android This function is now available for the Android applications that use data files in HFSQL format.
Android Widget This function is now available in Android Widget mode.
Java This function is now available for the Java applications.
Android This function is now available for the Android applications that use data files in HFSQL format.
Android Widget This function is now available in Android Widget mode.
Java This function is now available for the Java applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Check the index
let IndexResult = HCheckIndex(CUSTOMER)
// Manages the result
SWITCH IndexResult
CASE 0
Info ("The index is correct")
CASE 1
Info("The file must be optimized.")
CASE 2
Info("HFSQL error" + HError() + " during the test")
END
Syntax
<Result> = HCheckIndex([<File Name> [, <Key Name>] [, <Progress Bar>]])
<Result>: Integer
Can correspond to:
  • 0 if the check is correct.
  • 1 if the index is corrupted: a reindex operation is required (HIndex)
  • 2 if a HFSQL error occurred: the data file cannot be accessed, etc.
  • 3 if the function is not supported by this type of data file (xBase, AS400, ...)
<File Name>: Optional character string (with or without quotes)
Name of data file used. If this name is not specified, HCheckIndex handles the last data file used by the last function for HFSQL management (starting with the letter H).
<Key Name>: Optional character string (with or without quotes)
Name of the key item to check. If this parameter is not specified, all the keys of the data file are checked.
<Progress Bar>: Optional character string (with or without quotes)
  • Name of window where the progress bar will be displayed,
  • Name of the Progress Bar control to use.
WEBDEV - Server code This parameter is ignored.
Remarks

Corrupted index

When the function detects a problem in the index file, the H.Comment variable contains:
<Name of Affected Key> + TAB + <Record Number Causing Problem> + CR +
<Name of Affected Key 2> + TAB + <Record Number Causing Problem 2>...
<Record Number Causing Problem> is equal to -1 if no record was defined.
Note: The H.Comment variable is not filled if the index file is entirely corrupted.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Windows Mobile wp230hf.dll
Java wd230java.jar
Linux wd230hf.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment