PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Locks in version 5.5
  • Lock in the later versions
  • Locks when migrating a project to a later version
  • Notes
  • Case HModePerso(True)
  • Case HModePerso(False)
  • Case HModeSemiPerso()
  • Case HModeAuto
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Locking data files: correspondence between WINDEV 5.5 and the later versions
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
Locks in version 5.5
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.
Note: 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 23 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.
Note: A project migrated to version 23 will keep its own management of locks. The code is migrated in order for this management of locks to operate properly.
Notes

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 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 code line 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 code line HOnError("*",hErrAll,"") must be copied after each call.
  • Caution: When reading a record locked in read/write (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:
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
  RESULT opEndProgram
END
RESULT 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 code line HOnError("*", hErrAll, "") must be copied after each call.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment