- Record number not specified
- Data files in Hyper File 5.5 format
- xBase files
In french: HEtat
Available 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
<Result> = HState([<Data file> [, <Record number>]])
<Result>: Integer constant
Status of record:
|hStateActive||The record is active.|
|hStateCrossed||The record is crossed.|
|hStateDel||The record is deleted.|
|hStateInvalid||Record 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.
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
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
always returns hStateActive
This operating mode is no longer available in the HFSQL Classic engine. Once HDelete
was used on the current record, HState
returns the current record status.
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).
This page is also available for…