LockTableForSave: Boolean;
LockTableForSave: Boolean;
The LockTableForSave property determines whether cube table is locked on inserting or updating data.
Available values:
True. Lock table on inserting or updating data. Parallel insertions or updates of data in the table from other streams will be unavailable before the current data processing is not finished.
False. Default value. Do not lock table.
The property is relevant if the repository is based on the Oracle or Microsoft SQL Server DBMS. On using the Postgres or Teradata DBMS the property is not used and tables are not locked.
Executing the example requires that the repository contains a cube with the StdCube identifier. A repository is based on Oracle DBMS.
Sub UserProc;
Var
MB: IMetabase;
Cube: ICubeModel;
Begin
MB := MetabaseClass.Active;
Cube := MB.ItemById("StdCube").Edit As ICubeModel;
Cube.LockTableForSave := True;
(Cube As IMetabaseObject).Save;
End Sub UserProc;
On executing the example the mode of locking the table with data on inserting or updating data will be enabled.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Cube: ICubeModel;
Begin
MB := Params.Metabase;
Cube := MB.ItemById["StdCube"].Edit() As ICubeModel;
Cube.LockTableForSave := True;
(Cube As IMetabaseObject).Save();
End Sub;
See also: