Page 1 of 1

Read only error at Post command

Posted: 17.02.2012, 18:34
by Tesla
I'm using the latest SVN version of Delphi Zeos 7 in XE.
In use are a TZConnection and TZQuery. Throughout the ReadOnly property is set to false. Still, I get after a change in a data field and a command post, the error message: Operation is not allowed in READ ONLY mode! Maybe someone knows the problem and can help me. Thank you

Posted: 01.03.2012, 01:44
by mdaems
Can the database file be readonly?

Posted: 01.03.2012, 20:49
by Tesla
Hello mdaems,

no the the file is not readonly.

I found the error:

qrAn.SQL.text := 'select * from Anlagen where ID =' + inttostr(Idx);
//qrAn.ExecSQL; This statment set the query to ReadOnly
qrAn.Active := true;
qrAn.First;

Posted: 15.03.2012, 00:28
by mdaems
Actually, I'm wondering if it's desirable to show a resultset when using ExecSQL. That function should only be used to fire sql-statements that perform an Action (update, insert, create, drop, ...). Zeoslib is so nice to return an eventual dataset returned by an executed query, but maybe that makes it's function less clear.

Mark