ICachedDataset.ReadOnly

Syntax

ReadOnly: Boolean;

Description

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

Example

Sub UserProc;
Var
    MB: IMetabase;
    DSInst: IDatasetInstance;
    Cache: ICachedDataset;
    i: integer;
Begin
    MB := MetabaseClass.Active;
    DSInst := MB.ItemById("Table_1").Open(NullAs IDatasetInstance;
    Cache := DSInst.OpenCached;
    Cache.ReadOnly := True;
    Cache.Append;
    Cache.Fields.Item(0).Value := 10;
    Cache.Post;
End Sub UserProc;

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