ZQuery vs ZReadOnlyQuery

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
k1attila1
Junior Boarder
Junior Boarder
Posts: 29
Joined: 24.05.2013, 06:38

ZQuery vs ZReadOnlyQuery

Post by k1attila1 »

Hi

Could somebody tell me what is the difference between

ZQuery + Readonly=True and ZReadOnlyQuery ?

Mainly speed ? or somthing else ? (FireBird SQL)

Thank you Attila
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1935
Joined: 17.01.2011, 14:17

Re: ZQuery vs ZReadOnlyQuery

Post by marsupilami »

Hello Attila,

usually there should not be a big difference. But for some reason there is a notable difference - with Firebird at least. Use a TZReadOnlyQuery if you are sure, you don't need to modify anything.

With best regards,

Jan
k1attila1
Junior Boarder
Junior Boarder
Posts: 29
Joined: 24.05.2013, 06:38

Re: ZQuery vs ZReadOnlyQuery

Post by k1attila1 »

Thank you Jan, to clarify.
Attila
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: ZQuery vs ZReadOnlyQuery

Post by Fr0sT »

ZReadOnlyQuery executes queries (even modificating ones!) and returns resultset.
ZQuery additionally allows modification of this result set and posting it to DB.
ReadOnly property controls access level for current statement.

ZQuery adds some overhead, so if you don't need Dataset.Edit/Post methods, then use ZReadOnlyQuery.
Post Reply