ReadOnly: Boolean;
The ReadOnly property determines whether the data source is opened only for reading.
Sub UserProc;
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 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: