Page 1 of 1

Cannot modify a read-only dataset

Posted: Wed 19 Jan 2022 15:31
by swright
Delphi 7 SDAC issue after update

Updated from 9.3.2 to 10.0.2 and keep getting "Cannot modify a read-only dataset" when calling MSTable.Delete.

Reverted to 10.0.1 and still get the same issue.

Reverted to 9.3.2 and all working ok again.

Re: Cannot modify a read-only dataset

Posted: Thu 03 Feb 2022 10:36
by Stellar
Hi,

Unfortunately, we couldn't reproduce the issue. To investigate this behavior of SDAC, please compose a small sample demonstrating the issue and send it to us, including database objects creating scripts.
You can send the sample using the contact form at our site: devart.com/company/contactform.html

Best regards,
Sergey

Re: Cannot modify a read-only dataset

Posted: Thu 17 Feb 2022 10:41
by swright
I have taken a look and managed to create the problem with this test.

tblTest.FilterSQL := AnsiQuotedStr('Agent Code','"')+'='+AnsiQuotedStr('0TESTA12','''');
tblTest.Open;
MSConnection1.StartTransaction;
try
for i := 0 to tblTest.Fields.Count-1 do
tblTest.Fields.ReadOnly := True;
tblTest.Delete;
finally
MSConnection1.Rollback;
end;

The above code deletes the row in 9.3.2 (then rolls back). Fails with "Cannot Modify a read-only dataset" in 10.0.2

The reason for the fields being set read only is that the editor for the row is shown "read only" to the end user so they can see what they are deleting before clicking delete to remove the row.

I made another test using TTable and that deletes the row like 9.3.2.

Regards

Re: Cannot modify a read-only dataset

Posted: Wed 09 Mar 2022 12:54
by Stellar
Hi,

Thank you for your reply.
We've reproduced the issue and started to investigate possible causes of the described behavior.
We will let you know the results as soon as we get them.

Best regards,
Sergey

Re: Cannot modify a read-only dataset

Posted: Thu 01 Sep 2022 07:45
by Stellar
Hi,

Please be informed, that the "Cannot modify a read-only dataset" issue when deleting an entry has been fixed in the latest SDAC 10.1.1.

Kindly check if the issue still persists in the latest version of SDAC.
In order to do this, you may download the trial version of SDAC 10.1.1 from our website.

Best regards,
Sergey