If the filtering is enabled, only the records belonging to the current parent are taken into account.

If the filter is not active, the records found in the XML file are taken into account.

The filtering is enabled by default.

<Data file>: Optional character string (with or without quotes)

Name of data file, HFSQL view or query used. If this parameter is not specified, HNbRec handles the last data file used by the last function for HFSQL management (starting with the letter H).

<Options>: Optional constant (or combination of constants)

Configures the type of record to count.

hStateActive(default value)

Number of active records (not crossed or deleted).

hStateCrossed

Number of crossed records.

This option is not available.

hStateDel

Number of deleted records (does not include the crossed records).

hStateAll

Total number of records in the data file (hStateActive + hStateCrossed + hStateDel).

hNotLocking

Number of records retrieved in the view or query without waiting for the view or query to be entirely filled. To find out whether the execution of the view or query is completed, use ..ExecutionCompleted.This constant is available for the views and queries in HFSQL Classic or Client/Server.This constant has no effect for the data files and for the Native Connectors

This parameter is ignored. The number of records calculated by HNbRec always corresponds to the total number of records found in the table, on the database.

This number can differ from the number of displayed records if records have been added or deleted by another user. To view these new records, reinitialize a browse by using one of the following functions: HReadFirst, HReadLast, HFirst, HLast.

Access by JDBC
This parameter is ignored. The number of records calculated by HNbRec always corresponds to the total number of records found in the table, on the database.This number can differ from the number of displayed records if records have been added or deleted by another user. To view these new records, reinitialize a browse by using one of the following functions: HReadFirst, HReadLast, HFirst, HLast.

Remarks

Limitations

HNbRec does not return the number of records modified by an Update query (UPDATE).

HNbRec does not operate with the queries that use the hWithFilter constant.

xBase

HNbRec used with the hStateActive or hStateAll constant also returns the number of crossed records (or deleted records) (backward compatibility).

However, you can find out the number of crossed or deleted records by using HNbRec associated with the hStateDel or hStateCrossed constant.

Versions 18 and later

Number of records processed by the INSERT/UPDATE/DELETE updates

When running an INSERT/UPDATE/DELETE query on HFSQL data files, the number of added, modified or deleted records is returned by the H.NbRecModificationQuery variable.

New in version 18

Number of records processed by the INSERT/UPDATE/DELETE updates

When running an INSERT/UPDATE/DELETE query on HFSQL data files, the number of added, modified or deleted records is returned by the H.NbRecModificationQuery variable.

Number of records processed by the INSERT/UPDATE/DELETE updates

When running an INSERT/UPDATE/DELETE query on HFSQL data files, the number of added, modified or deleted records is returned by the H.NbRecModificationQuery variable.