DbServer.ConcurrencyControl Property | |
A constant, identifying the mode of automatic concurrency control for this data server, determining when and how records are locked and released:
Namespace:
VO
Assembly:
VORDDClasses (in VORDDClasses.dll) Version: 2.21
Syntax VIRTUAL PROPERTY ConcurrencyControl AS USUAL GET SET
public override Usual ConcurrencyControl { get; set; }
Request Example
View SourceProperty Value
Type:
UsualA constant, identifying the mode of automatic concurrency control for this data server, determining when and how records are locked and released:
Remarks
One of the following constants, identifying the mode of automatic concurrency control for this data server, determining when and how records are locked and released:
Constant | Description |
---|
CCNONE | The data server provides no automatic record locking; the application is required to do all locking explicitly. |
CCOPTIMISTIC |
No locks are maintained continuously except when appending—the record just appended is locked, and the lock is only
released when moving off the record or explicitly calling the DataServer or DBServer Unlock() method.
For all other records, the record is reread from disk before any update is done. This is the default.
|
CCSTABLE | The record that the window is sitting on is always kept locked. Note that when in browse view, the row that the cursor is on represents the current record. |
CCREPEATABLE | All records that have been read are maintained locked. The user is guaranteed that when moving back among previously viewed data, they are unchanged. |
CCFILE | All the records in the entire set provided by the server are locked throughout. This is not very practical for windows associated with all the records of a server, since it would correspond to a file lock. It is intended to be used in conjunction with method DBServer:SetSelectiveRelation(). |
Examples
This example sets up the Sales:Init() method to accept the open mode for the server as an argument. Then, the oDBSales server is opened using CCNONE, indicating that any application using this server must supply code for explicit locking:
1CLASS Sales INHERIT DBServer
2...
3METHOD Init(kOpenMode) CLASS Sales
4...
5SELF:ConcurrencyControl := kOpenMode
6FUNCTION CreateSales()
7LOCAL oDBSales AS Sales
8oDBSales := Sales{CCNONE}
9...
See Also