Page 1 of 1

Cannot modify a Read-only dataset

Posted: Sun 13 Nov 2011 08:46
by fmartinez
Hello!.


I am being tested for MYSQL devart component.
But I have up the next problem:

I created a FORM which has only one SQLConnection1 (DevartMySQL) and SQLDataSet.

Are connected correctly and I can make a query ok.

the problem is that when I do an Update or Insert, I get a window with the following error:
Cannot modify a Read-only dataset

can help me?

Thanks!

Posted: Sun 13 Nov 2011 15:43
by fmartinez
I'm using Embarcadero XE2 Update2.

Posted: Mon 14 Nov 2011 10:31
by AndreyZ
Hello,

The TSQLDataSet standard component is unidirectional, this is a specificity of the dbExpress technology. You can find more information about TSQLDataSet in the RAD Studio XE2 documentation. Here is a quote from it:
TSQLDataSet is a general purpose unidirectional dataset for accessing database information using dbExpress.
To work with data in bidirectional mode, you should use the following chain of components:

Code: Select all

TSQLConnection->TSQLDataSet->TDataSetProvider->TClientDataSet->TDataSource->TDBGrid
For more information, please read the "Using dbExpress" and "Using dbExpress Datasets" articles of the RAD Studio XE2 documentation.