|
|
|
|
|
- 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
Locking data files: correspondence between WINDEV 5.5 and the later versions
![HFSQL Classic HFSQL Classic](https://doc.windev.com/ext/images/us/HF.png?-2134303037) Available only with these kinds of connection
Three management modes of locks were available in network: - HModePerso(True): The lock tests had to be run after each call to a Hyper File function.
- HModePerso(False): The lock tests should be run after each call to a Hyper File function except for the non-locking read functions.
- HModeSemiPerso(): The test of the status error of lock was automatically run. If the lock failed, the execution of the program was stopped.
HModeAuto was used in single-user mode. Remark: No automatic management of locks is available for the 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 SaaS 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.
Remark: A project migrated to version SaaS will keep its own management of locks. 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 code line HOnError("*",hErrAll,"") is inserted into the initialization code of project.
- 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.
- Caution: When reading a record locked in read/write mode (if HLockFile was called for example):
- 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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|