Hi all,
whatever sql I set to a TOraQuery, propery CanModify is True.
for example if I run the following piece of code:
Query.SQL.Text := 'SELECT ''1'' as pippo from dual';
Query.Open;
Assert(not Query.CanModify);
assertion fails.
In BDE, if I requested this query to be "live", it would rise an exception "table is readonly".
How can I understand that a query is not editable in odac?
Thank you!
lorenzo
TOraQuery.CanModify
Hello,
To check the capability of editing DataSet, you need to set the SetFieldsReadOnly option to true – in this case the CanModify property will be set correctly. But this option usage will decrease performance:
To check the capability of editing DataSet, you need to set the SetFieldsReadOnly option to true – in this case the CanModify property will be set correctly. But this option usage will decrease performance:
Code: Select all
OraQuery1.SQL.Text := 'SELECT ''1'' as pippo from dual';
OraQuery1.Options.SetFieldsReadOnly := true;
OraQuery1.Open;
Assert(not OraQuery1.CanModify);