UniQuery error when readonly
Posted: 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.
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?
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;
Any suggestions?