UniQuery error when readonly

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kneighbour
Posts: 77
Joined: Wed 08 Oct 2008 04:55

UniQuery error when readonly

Post by kneighbour » Fri 21 Aug 2015 07:14

I am using UniDac 5.5.12 in Delphi XE7. I am connecting to a Firebird 2.5 database.

I rarely use readonly queries but this must have worked at one stage. I currently get an error when I run the following bit of code.

Code: Select all

  
   qryItems.disablecontrols;
   qryItems.close;
   with qryItems do
      begin
         sql.clear;
         sql.add('SELECT * FROM ITEMTBL');
         sql.add('WHERE ITEM_NUMBER=' + AddQuotes(stItem));
         readonly := true;
         open;
      end;
   qryItems.enablecontrols;
The error is - "cannot modify a readonly dataset". I am not trying to modify anything. If I make the readonly:=false, it all works ok.

Any suggestions?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: UniQuery error when readonly

Post by ViktorV » Fri 21 Aug 2015 08:38

Unfortunately we can't reproduce the problem. To investigate this behavior of UniDAC, please compose a small sample demonstrating the problem and send it to viktorv*devart*com, including a script for creation and filling in the test database object.

Post Reply