Problem with Insert() and Post() in TOracleDataSet

Andrewc

Member
Is there any reason why code that worked perfectly with Insert() and Post() suddenly no longer works. It now comes back with "cannot modify a readonly dataset" even though the value of CanModify = true just before the Post().

This suddenly happened in two separate places in my code that I had not changed. I have had to modify it to "INSERT INTO..." statements that do work. Also if I have record in the table and run Edit() and then Post() then it worked without the error.

I am confused as to why this suddenly stopped working on two different DataSet's linked to the same Session.

Any comments are welcome.
 
This exception can only happen if CanModify is False (see DB.pas --> TDataSet.Insert).

Are you sure CanModify is True?

------------------
Marco Kalter
Allround Automations
 
Back
Top