ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
HState (Function)
In french: HEtat
HFSQL ClassicHFSQL Client/ServerAvailable only with these kinds of connection
Used to find out the state of a record. A record can be active, crossed or deleted.
IF HState(Customer) = hStateActive THEN
// Processes
END
Syntax
<Result> = HState([<Data file> [, <Record number>]])
<Result>: Integer constant
Status of record:
hStateActiveThe record is active.
hStateCrossedThe record is crossed.
hStateDelThe record is deleted.
hStateInvalidRecord status not found (error).
<Data file>: Optional character string
Name of the data file used. If this name is not specified, HState will use the last data file used by the last HFSQL function (function starting with "H").
<Record number>: Optional integer
Number of the sought record. If this number is not specified (or is equal to 0), HState will handle 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, hRecNumCurrent)
WINDEVWEBDEV - Server codeHyper 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.
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)AjaxNative 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 using HModify.
In this case, HState returns the hStateCrossed constant for a deleted record (instead of hStateDel).
Component: wd290hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/22/2023

Send a report | Local help