ZQuery vs ZReadOnlyQuery

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

ZQuery vs ZReadOnlyQuery

Postby k1attila1 » 27.04.2017, 08:56

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
Gold Boarder
Gold Boarder
Posts: 590
Joined: 17.01.2011, 14:17

Re: ZQuery vs ZReadOnlyQuery

Postby marsupilami » 27.04.2017, 23:00

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

Postby k1attila1 » 29.04.2017, 08:27

Thank you Jan, to clarify.
Attila

Fr0sT
Junior Boarder
Junior Boarder
Posts: 43
Joined: 08.05.2014, 12:08

Re: ZQuery vs ZReadOnlyQuery

Postby Fr0sT » 26.09.2017, 13:51

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.


Return to “ZeosLib 7.1 stable Forum”

Who is online

Users browsing this forum: No registered users and 1 guest