- Lock mode
- Changing the mode
- Changing the method
- Changing the mode and the method
<Source>.Mode (Function) In french: <Source>.Mode
Not available with this kind of connection
Changes the mode and the method for locking data files.
// Change the mode for all the files HMode("*", hModeMulti) // Make the "Customer" file inaccessible to the other applications Customer.Mode(hModeMono)
Syntax <Result>: Integer constant Lock mode performed on the data file before modification. | | hModeMono | Single-user mode: the data files are entirely locked in read/write as soon as they are opened. This mode prevents the other applications from accessing the data files already opened by the current application. | hModeMulti | Multi-user mode: the data files are not locked when they are opened. The other applications can access the data files. |
<Source>: Type corresponding to the specified source Name of the data file used. <Mode>: Integer constant Lock mode that must be performed on the data file.
| | hModeMono (default value) | Single-user mode: the data files are entirely locked in read/write as soon as they are opened. This mode prevents the other applications from accessing the data files already opened by the current application. | hModeMulti | Multi-user mode: the data files are not locked when they are opened. The other applications can access the data files. |
Modifying the lock mode and the lock method (advanced use) Hide the details
<Result> = <Source>.Mode(<Mode> [, <Method>])
<Result>: Integer constant Lock mode performed on the data file before modification. | | hModeMono | Single-user mode: the data files are entirely locked in read/write as soon as they are opened. This mode prevents the other applications from accessing the data files already opened by the current application. | hModeMulti | Multi-user mode: the data files are not locked when they are opened. The other applications can access the data files. |
<Source>: Type corresponding to the specified source Name of the data file used. <Mode>: Integer constant Lock mode that must be performed on the data file.
| | hModeMono (default value) | Single-user mode: the data files are entirely locked in read/write as soon as they are opened. This mode prevents the other applications from accessing the data files already opened by the current application. | hModeMulti | Multi-user mode: the data files are not locked when they are opened. The other applications can access the data files. |
<Method>: Optional integer constant Method for implementing the locks: | | hModeDirect (default value) | The implementation of locks has priority (over the modification for example). Therefore, a record on which several read operations are performed will not be modified but the locks are faster. | hModeReservation | Implementation of non-priority locks (advanced use) This method allows you to immediately modify a record on which several read operations are performed. This method is slower than the hModeDirect method. This constant is useful when an important number of locking read operations are successively performed on the same record. |
Remarks Lock mode By default, if the current project: - is associated with an analysis, the lock mode performed on the data files is the multi-user mode (the data files are not locked when they are opened, the other applications can access the data files).
- is not associated with an analysis, the lock mode performed on the data files is the single-user mode: the data files are entirely locked in read/write as soon as they are opened. This mode prevents the other applications from accessing the data files already opened by the current application.
To modify the lock mode used: - Open the project description window: on the "Project" tab, in the "Project" group, click "Description".
- Display the "Files" tab.
- Specify the lock mode that must be used ("Management mode of files").
Changing the mode Changing the mode cancels all the current locks applied to the data file. There is no need to close the data file to change mode. Changing the method Changing the method has no effect on the current locks applied to the data file. There is no need to close the data file to change method. Changing the mode and the method The change of mode and method is directly performed on the physical data file. Therefore, this change is applied to the data file and to all its aliases.
This page is also available for…
|
|
|
|