ZQuery update issue

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
nickt
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 31.01.2007, 20:02

ZQuery update issue

Post by nickt »

I am using Firebird 2.0 and Delphi 6 Enterprise and Zeos 6.6.

I have an application that logs events through out it's run and can display them in an event view (zquery and a dbgrid). My problem is that this is fine for a single application but if I launch the same app on another workstation I never see any of the events created by the other app. Even if I completly close the ZQuery, reset the SQL commands (select * from eventview) I still never see any event from the other app. If I completly close the first app and then reopen I see the events from the second app. I used FlameRobin to view the DB and all the entries are in the same so I am puzzeled as to why I do not see them in a query.
It's as if ZQuery is caching the entire table then doing queries on it as opposed to querying the actual database.

Any thought on this?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

My guess : have a look at transaction isolation levels. As long as you are in the same transaction in your query application you will not see updates by other connections when your TIL is 'repeatable read' (or something like that). A commit before requerying would do as well choosing another TIL if this is the reason.

Mark
nickt
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 31.01.2007, 20:02

Post by nickt »

Thanks for the reply Mark. My TIL is set to tiNone and I have autocommit set to true. I'll play around a bit more and see if I can get it to work.

Thanks again
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

A quick look on the web tells me default TIL for firebird is IsolationLevel.ReadCommitted. I suppose this will be used when you say tiNone. To be sure you could explicitly set TIL to this value. This means : as soon as the creating connection commits the data is (should be) visible to your querying connection.
If it is not : check what query is exactly sent to the server, (eg by using the ZSQLMonitor component). Maybe some filtering is added behind the scenes? Case sensitivity?

Mark
Post Reply