The TagBrowseNumRecords function gets the number of records for a given browsing session. This function may not be accurate if the following occurs:
- Project misconfiguration on two separate machines
- Online changes happening on two separate machines.
The count will be a consolidated sum of all browse records per I/O Device as returned by each I/O Server in response to opening a browse session. The count reconciliation is performed on the basis of the "best device status", that is records with the "best status" are picked and the others are discarded. "Best device status" is calculated as follows:
- Data Source online state (ONLINE is picked over OFFLINE), then
- Data Source active state (ACTIVE is picked over INACTIVE), then
- Data Source priority (higher priority is picked over a lower one, with highest being 1 – for primary I/O device).
Syntax
INT TagBrowseNumRecords(LONG Session)
Session:
The handle to a browse session previously returned by a TagBrowseOpen call.
Return Value
Number of records (INT) if successful -1 if unsuccessful.
Related Functions
TagInfoEx, TagInfo, TagBrowseClose, TagBrowseFirst, TagBrowsePrev, TagBrowseOpen, TagBrowseNext,TegBrowseGetField
Example
// number of records TBResult = TagBrowseNumRecords(TBHandle); ErrLog("Num Records: " + IntToStr(TBResult)); END
See Also
Published June 2018