You are not logged in.
I’m facing a problem where TOrmTableDataSet3 is read-only, preventing me from modifying the dataset.
I'm loading the dataset using TOrmTableDataSet.CreateFromJson. Here's the code I’m using for appending data:
UniEdit1.onkeyPress
with DataSource1.DataSet do
begin
Append;
FieldByName('NewQty').AsString := 'AG-' + Format('%', [UniEdit1.Text]);
end;
However, I keep getting the error => TOrmTableDataSet3: Cannot modify a read-only dataset.
Offline
However, I keep getting the error => TOrmTableDataSet3: Cannot modify a read-only dataset.
What is your question?
With best regards
Thomas
Offline
It is a read-only dataset by design.
It is a TDataSet which maps the JSON values.
If you want to modify the dataset content, you need a read/write dataset.
For instance, you can use https://github.com/synopse/mORMot2/blob … ui.cds.pas which uses a TClientDataSet for a read/write storage.
Offline