|
|
|
|
|
- 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
Blocking data files: correspondence WINDEV 5.5 and higher versions
 Available only with these kinds of connection
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 automatic. If the lock failed, the execution of the program was stopped.
HModeAuto was used in single-user mode. Remark: Block management is not automatic on Memo or Binary Memo type 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): multi-user mode management (network)
- hMode(HModeMono): single-user mode management.
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. Type of 5.5 lock: 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: 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 event of a read/write block (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: 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: 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|