Read only error at Post command

Forum related to SQLite

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Tesla
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 17.02.2012, 17:58

Read only error at Post command

Post 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
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Can the database file be readonly?
Image
Tesla
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 17.02.2012, 17:58

Post 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;
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
Post Reply