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
  • Reinitializing positions
  • Miscellaneous
  • Repositioning principle for Native Connectors (also called Native Access)
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
HRestorePosition (Function)
ODBCNo disponible con este tipo de conexión
Restores the previously saved context of a data file (function HSavePosition): record in progress, filter, read pointers.
HRestorePosition is used to restore:
  • the number of the record used,
  • the different pointers in the index (the position in the index is saved for each key),
  • the current filter (only if the hRPFilter constant is specified).
This function can be used with the data files, HFSQL views or queries.
Ejemplo
// Find a record
HReadSeekFirst(Customer, Name, Name)
WHILE HFound(Customer) = True
	// Saves the current context
	nPos = HSavePosition(Customer, Name)
	// Check a customer with another name
	HReadSeek(Customer, Name, Name2)
	IF HFound() = True THEN Counter = Counter + 1
	// Restores the context
	HRestorePosition(nPos)
	HReadNext(Customer, Name)
END
Sintaxis

Restoring the specified position Ocultar los detalles

<Result> = HRestorePosition(<Position> [, <Option>])
<Result>: Boolean
  • True if the specified position was restored,
  • False otherwise. HError returns more details about the problem.
<Position>: entier
Position to restore. Value returned by HSavePosition.
<Option>: Optional constant (or combination of constants)
Used to configure the restore operation:
hRPDefault
(default value)
The position is freed. The stored position is restored.
hRPFilterRestores the filter implemented during the call to HSavePosition.
hRPHF5If the stored position was deleted or modified, this position is still restored.
If the hRPHF5 constant is not specified and if the backup was performed on several items, the positioning is performed according to the current record number during the call to HSavePosition.
PHP This constant is not supported.

Java JDBC access: This constant is not supported.
hRPKeepThe position is not freed (other calls to HRestorePosition can be performed on this position).
Hyper File 5.5 This parameter is not taken into account: the position will be saved for all browse items in progress.

Restoring a data file Ocultar los detalles

<Result> = HRestorePosition([<Data file>])
<Result>: Boolean
  • True if the context has been restored,
  • False otherwise. HError returns more details about the problem.
<Data file>: Optional character string
Name of the data file whose context is to be restored. If this name is not specified, HRestorePosition will use the last data file used by the last HFSQL function (function starting with "H").
Observaciones

Reinitializing positions

Please note: all functions which open or close a data file reset the context numbers (e.g. HCreation, HClose, ...).
If the record saved by HSavePosition was deleted, HRestorePosition keeps the current context but it will position on the record following the deleted record.
OLE DB When reinitializing a browse, the positions saved on this browse are destroyed. The HFSQL engine uses the value of best item to attempt a new positioning. The best item is selected in the following preference order:
  1. Automatic identifier
  2. Unique key
  3. First key
  4. First item
The following functions reinitialize the iteration:

Miscellaneous

WINDEVWEBDEV - Código ServidorConectores Nativos

Repositioning principle for Native Connectors (also called Native Access)

The record is restored from the internal cache of the Native Connector.
Please note: when restoring, no check is made on the existence of the record in the database (the record may have been deleted).
You have the ability to "force" the reading on the database by using HRead after HRestorePosition. In this case:
  • the record values will be read again in the database.
  • if the record has been deleted, the Native Connector will return error 13: The current record could not be found. It was modified or deleted from the data source.
Special cases: MySQL, DB2 and Informix native connectors After using the HRestorePosition FUNCTIONfunction, the HReadNext and HReadPrevious functions generate a query to find the record following or preceding the restored record.
Clasificación Lógica de negocio / UI: Lógica de negocio
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