Read only error at Post command

Forum related to SQLite

Moderators: gto, cipto_kh, EgonHugeist

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

Read only error at Post command

Postby Tesla » 17.02.2012, 18:34

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:

Postby mdaems » 01.03.2012, 01:44

Can the database file be readonly?
Image

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

Postby Tesla » 01.03.2012, 20:49

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:

Postby mdaems » 15.03.2012, 00:28

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


Return to “SQLite”

Who is online

Users browsing this forum: No registered users and 1 guest