|
|
|
|
|
- Read operation according to a key item or not
- Memos
- Lock
- Miscellaneous
HForward (Function) In french: HAvance
Not available with this kind of connection
Moves several records forward from the current position in the data file, according to a specified item. The destination record is read and loaded into memory: HFSQL variables are updated (e.g. Client.Name, i.e. the Nom field in the Clientdata file). Several cases may occur after the call to HForward: - there are no more records in the data file: function HOut returns True. No read operation is performed.
- the function attempts to block a record already blocked in playback: function HErrorLock returns True and function HOut returns True.
JDBC access: lock management is not supported for databases that are accessed through JDBC.
This function can be used with the data files, HFSQL views or queries.
HReadFirst(Customer, CustomerName)
HForward(Customer, CustName, 1999)
Syntax
<Result> = HForward([<Data file>] [, <Item> [, <Step> [, <Options>]]])
<Result>: Boolean - True if the data file has been scrolled,
- False in case of error (blocking, end of data file, etc.): the record is not read.. HError is used to identify the error.
<Data file>: Optional character string Name of the data file, view or query used. If this name is not specified, HForward will use the last data file used by the last HFSQL function (function starting with "H"). <Item>: Optional character string Name of item according to which the browse is performed. If this name is not specified, HForward handles the last item in the data file used by the last HFSQL function (function starting with "H"). <Step>: Optional integer Number of steps forward (which means number of records to browse). By default, <Step> = 1.
<Options>: Optional Integer constant (or combination of constants) Configures:- the lock mode applied to the record read. By default, the lock performed corresponds to the current lock.
| | hLockNo | No blocking: the recording can be played back or modified by another application during playback. | hLockReadWrite | Read/write lock: the record being read cannot be read or modified by another application. | hLockWrite | Write lock: the record currently read can be read by another application but it cannot be modified by another application. |
 The lock options will have no effect if the locks are not supported by the OLE DB provider or by the Native Connector.
JDBC access: lock management is not supported for databases that are accessed through JDBC.
- the management of duplicates during the browse. By default, all duplicates are iterated over.
| | hDistinct | Only one record is read if duplicates are found when looping through a key item. |
Remarks Read operation according to a key item or not If the item used is a key item: - if the hDistinct constant is not specified, HForward moves forward <Step> key values from the current position.
- if the hDistinct constant is specified, HForward moves forward <Step> key values from the current position. If duplicates are found, a single duplicate is read.
If the item used is not a key item: - the hDistinct constant is not available.
- HForward moves foward from <Step> active records from the current position.
Memos The memos associated with the record can be automatically read (or not) when reading the record. HSetMemo is used to customize this automatic read operation. If the memos are supported, the associated text memos are read when the record is read. The binary memos are read only when they are explicitly used ( HExtractMemo). Lock By default (no lock variable specified), the lock performed corresponds to the current lock mode. If a lock is specified (hLockWrite or hLockReadWrite constant), the record will be read and locked only if it is not already locked by another application. Miscellaneous - The result of HFound must be ignored (HFound must be used for the searches performed by HReadSeek).
- HRecNum returns the current record number.
- HForward respects the current active filter (defined by HFilter).
- HChangeKey changes the search key while keeping the position on the current record.
- HForward(Customer,Name) is equivalent to HReadNext(Customer,Name)
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|