AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL
  • Read operation according to a key item or not
  • Memos
  • Miscellaneous
  • Lock
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Moves backward several records 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. Customer.Name, i.e. the field Name field of the Client).
Several cases may occur after the call to HBackward:
  • 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 play mode: function HErrorLock returns True and function HOut returns True.
    PHP Management of locks not available in PHP.
This function can be used with the data files, HFSQL views or queries.
Ejemplo
// Go back to the 200th record of the Customer data file
// according to the CustName key
HReadLast(Customer, CustName)
HBackward(Customer, CustName, 199)
Sintaxis
<Result> = HBackward([<Data file> [, <Item>] [, <Step> [, <Options>]]])
<Result>: Boolean
  • True if the backward move was performed in the data file,
  • False in case of error (block, 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, HBackward 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, HBackward handles the last item in the data file used by the last HFSQL function (function starting with "H").
OLE DBConectores Nativos All the items used to move backward in the file are considered as being key items.
PHP The <Step> parameter is mandatory if this parameter is not specified.
<Step>: Optional integer
Number of steps backward (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.
    hLockNoNo blocking: the Record can be played back or modified by another application during playback.
    hLockReadWriteRead/write lock: the record being read cannot be read or modified by another application.
    hLockWriteWrite lock: the record currently read can be read by another application but it cannot be modified by another application.

    OLE DBConectores Nativos The lock options will have no effect if the locks are not supported by the OLE DB provider or by the Native Connector.
  • the management of duplicates during the browse. By default, all duplicates are iterated over.
    hDistinctOnly one record is read if duplicates are found when looping through a key item.
Hyper File 5.5 <Options> is ignored.
PHP <Options> is ignored.
Observaciones

Read operation according to a key item or not

In all cases, the route must have been initialized with one of the following functions: HReadFirst, HFirst, HReadSeekFirst, HSeekFirst, HChangeKey, HRestorePosition.
If the item used is a key item:
  • if the hDistinct constant is not enabled, HBackward moves backward of <Step> key values from the current position.
  • if the hDistinct constant is enabled, HBackward moves backward of <Step> distinct 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,
  • HBackward moves backward of <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).

Miscellaneous

WEBDEV - Código ServidorAjaxHFSQL ClassicHFSQL Client/ServerHyper File 5.5OLE DBConectores Nativos

Lock

By default (no lock variable specified), the lock performed corresponds to the current lock mode.
If a lock is requested (hLockWrite or hLockReadWrite constant), the record will be read and locked only if this record is not already locked by another application.
Componente: wd300hf.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local