ICachedDataset.ReadOnly

Syntax

ReadOnly: Boolean;

Description

The ReadOnly property determines whether the data source is opened only for reading.

Example

Sub Main;

Var

MB: IMetabase;

DSInst: IDatasetInstance;

Cache: ICachedDataset;

i: integer;

Begin

MB := MetabaseClass.Active;

DSInst := MB.ItemById("Table_1").Open(Null) As IDatasetInstance;

Cache := DSInst.OpenCached;

Cache.ReadOnly := True;

Cache.Append;

Cache.Fields.Item(0).Value := 10;

Cache.Post;

End Sub Main;

After executing the example the error, that Data source is read-only, is generated at attempt to add record into the DSInst data source.

See also:

ICachedDataset