PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Record number not specified
  • Data files in Hyper File 5.5 format
  • xBase files
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
HState (Function)
In french: HEtat
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
Allows you to find out the record status. A record can be active, crossed or deleted.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
IF HState(CUSTOMER) = hStateActive THEN
        // Processes
END
Syntax
<Result> = HState([<File name> [, <Record number>]])
<Result>: Integer constant
Status of record:
hStateActiveThe record is active.
hStateInvalidRecord status not found (error).
hStateCrossedThe record is crossed.
hStateDelThe record is deleted.
<File name>: Optional character string (with or without quotes)
Name of data file used. If this name is not specified, HState handles the last data file used by the last function for HFSQL management (starting with the letter H).
<Record number>: Optional integer
Number of the sought record. If this number is not specified (or if it is equal to 0), HState handles the current record. The current record is not read again.
Remarks

Record number not specified

HState reads no record if <Record number> is not specified.
In a network application, we advise you to read the record again before the call to HState to make sure that the record was not deleted. With HRead for example:
HRead(FileName, hCurrentRecNum)
Hyper File 5.5

Data files in Hyper File 5.5 format

With the Hyper File 5 engine, the record must be read again in order for its status to be refreshed. Indeed, if the record is not read again after HDelete or HCross, HState always returns hStateActive.
This operating mode is no longer available in the HFSQL Classic engine. Once HDelete or HCross was used on the current record, HState returns the current record status.
Reports and QueriesNative Connectors (Native Accesses)

xBase files

HDelete and HCross have the same effect: the record is crossed but it is not deleted. Therefore, the record can be re-enabled by HModify.
In this case, HState returns the hStateCrossed constant for a deleted record (instead of hStateDel).
Component : wd250hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment