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
  • Locks in version 5.5
  • Lock in the later versions
  • Locks when migrating a project to a later version
  • Remarks
  • Case HModePerso(True)
  • Case HModePerso(False)
  • Case HModeSemiPerso()
  • Case HModeAuto
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
Blocking data files: correspondence WINDEV 5.5 and higher versions
HFSQL ClassicHFSQL Client/ServerDisponible solo con estos tipos de conexión
Locks in version 5.5
Three management modes of locks were available in network:
  • HModePerso(True) Blocking tests had to be performed after each call to a Hyper File function.
  • HModePerso(False) Blocking tests should be performed after each call to a Hyper File function, except for non-blocking Hyper File read functions.
  • HModeSemiPerso(): Blocking report test was automated. If the lock failed, the execution of the program was stopped.
HModeAuto was used in single-user mode.
Note Lock management is not automatic on Memo or Binary Memo items.
Lock in the later versions
In the versions later than version 5.5, the management of locks is easier yet more powerful:
  • hMode(HModeMulti) management of a multi-user mode (network)
  • hMode(HModeMono) management of a single-user mode.
In a new WINDEV 2025 application, in multi-user mode, the locks are automatically managed by the HFSQL engine. This can be customized by HOnError.
Locks when migrating a project to a later version
When a project is migrated to a version later than version 5.5, some operations are automatically performed to keep the operating mode of WINDEV 5.5 while limiting the code modifications. The table below presents for each lock mode of WINDEV 5.5:
  • the operations automatically performed during the migration
  • the operations that must be performed in special cases.
Remarque: A project migrated to version 2025 will retain its own lock management.. The code is migrated in order for this management of locks to operate properly.
Remarks

Case HModePerso(True)

Type of 5.5 lock:
HModePerso(True)
Equivalent code:
HMode(hModeMulti)
HOnError("*", hErrAll, "")
  • The equivalent code is automatically inserted when migrating the project.
  • The line of code HOnError("*",hErrAll,"") is inserted into the project initialization code.
  • If your WINDEV 5.5 code contained several calls to HModePerso(True), the line of code HOnError("*",hErrAll,"") must be copied after each call.

Case HModePerso(False)

Type of 5.5 lock:
HModePerso(False)
Equivalent code:
HMode(hModeMulti)
HOnError("*", hErrAll, "")
  • The equivalent code is automatically inserted when migrating the project.
  • The HOnError("*",hErrAll,"") code is inserted into the initialization code of the project.
  • If your WINDEV 5.5 code contained several calls to HModePerso(False), the line of code HOnError("*",hErrAll,"") must be copied after each call.
  • Warning: In the case of a read/write blocked record (e.g. if function HLockFile has been called):
    • the Hyper File 5.5 engine retried indefinitely while ignoring the value of H.NbRetry.
    • the HFSQL Classic engine retries while taking the value of H.NbRetry into account.

Case HModeSemiPerso()

Type of 5.5 lock:
HModeSemiPerso()
Equivalent code:
HMode(hModeMulti)
HOnError("*",hErrLock, "_LockFailed")
Where "_LockFailed" is a global procedure of the project
PROCEDURE _LockFailed()
IF YesNo("Lock" + "Do you want to retry or exit from the program") = No THEN
  RETURN opEndProgram
END
RETURN opRetry
  • HModeSemiPerso is automatically migrated to HMode(hModeMulti).
  • The HOnError("*",hErrAll,"") code is inserted into the initialization code of the project.
  • Operations to perform:
    • Create a procedure global to the project with the following code.
    • Modify HOnError to start the global procedure.
  • If your WINDEV 5.5 code contained several calls to HModeSemiPerso, the call to HOnError must be copied after each call to HModeSemiPerso.

Case HModeAuto

Type of 5.5 lock:
HModeAuto
Equivalent code:
HMode(hModeMono)
HOnError("*", hErrAll, "")
  • The equivalent code is automatically inserted when migrating the project.
  • The HOnError("*",hErrAll,"") code is inserted into the initialization code of the project.
  • If your WINDEV 5.5 code contained several calls to HModeAuto, the line of code HOnError("*", hErrAll, "") must be copied after each call.
Ver también
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