ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Position in relation to a key item or to a non-key item
  • Position in a filtered iteration
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
Returns the approximate position of current record in the data file. This position is given in relation to a specific item.
Remark: The position is given approximately for performance reasons. The position is calculated according to the position in the index.
Example
Customer.Seek(Name, "Smith")
IF Customer.Found() = True THEN
Percentage is int = Customer.GetCurrentPosition(Name)/10
Info("The first Smith is at " + Percentage + "% of Customer on the Name key")
END
Syntax
<Result> = <Source>.CurrentPosition([<Item> [, <Precision>]])
<Result>: Integer
  • Approximate current position, plotted to the [1;1000] interval.
  • -1 if an error occurs (empty data file, filter returning no result, etc.). HErrorInfo returns more details about the problem.
<Source>: Type corresponding to the specified source
Name of the data file used.
<Item>: Optional character string
Name of the item used. If this name is not specified, <Source>.GetCurrentPosition will use the last item used by the last HFSQL management function (function starting with "H").
<Precision>: Optional integer
Defines the precision with which the position is evaluated. Caution: The higher the precision, the longer it takes to evaluate the position in the file.
hPrecisionHighHigh precision.
hPrecisionLowLow precision.
hPrecisionMedium
(default value)
Medium precision.

Remarks
Reports and QueriesHFSQL ClassicHFSQL Client/ServerHyper File 5.5OLE DBNative Connectors (Native Accesses)

Position in relation to a key item or to a non-key item

For a key item, the position returned is relative to the position of the record in the index of this item.
For a non-key item, the position returned is relative to the record number in the data file (see <Source>.RecNum).
Reports and QueriesHFSQL ClassicHFSQL Client/ServerHyper File 5.5OLE DBNative Connectors (Native Accesses)

Position in a filtered iteration

If a filter with bounds is defined (<Source>.Filter without condition string but with lower and upper bounds), the returned position is relative to the records selected by the filter.
If a condition string is given to <Source>.Filter, the returned position ignores the filter.
Component: wd290hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/06/2023

Send a report | Local help