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
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Sets the position on a record, based on the approximate position of one of its items. The record is read.
This function can be used with the data files, HFSQL views or queries.
Caution: <Source>.SetPosition can only be used to set a position. To find out the current position, use <Source>.GetCurrentPosition.
Customer.SetPosition(name, 500)
<Result> = <Source>.SetPosition([<Item>, ] <Position> [, <Precision>])
<Result>: Boolean
  • True if the positioning was performed,
  • False otherwise. HError returns more details about the problem. If no record corresponds, <Source>.Out returns True and no record is read.
<Source>: Type corresponding to the specified source
Name of data file, view or query used.
<Item>: Optional character string
Name of the item used.
If this name is not specified, <Source>.SetPosition will use the last item used by the last HFSQL management function (function starting with "H").
<Position>: Integer
Approximate position to fix. This position must be found in the [1;1000] interval.
<Precision>: Optional integer
Defines the precision with which the position is performed. Caution: The higher the precision, the longer it takes to be positioned in the file.
hPrecisionHighHigh precision.
hPrecisionLowLow precision.
(default value)
Medium precision.

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

  • For a key item, the position is relative to the order of the record in the index of this item.
  • For a non-key item, the position is relative to the number of the record in the data file (see <Source>.RecNum).

Position in a filtered iteration

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

Last update: 07/06/2023

Send a report | Local help