Page 1 of 1

ZConnection refresh issue.

Posted: 12.10.2005, 19:21
by glashtin
ZConnection does not appear to refresh itself until the application is closed and reopened.

I am using Delphi 2005, ZeosLib 6.5.1 alpha CVS as of 26/09/2005, FireBird 1.5, Windows XP Pro.

I created a simple app with a TZConnection, TZQuery, TDataSet, TDBLabel, TButton.

When I open the app the dblabel displays the current field fine. Then I change the value using a db editor and go back to my app and click the button with calls ZQuery1.Refresh; I would think this would update the dblabel to the new current value but it does not. However if I close my app and reopen it, the new value is displayed correctly. Also if my app is the one that makes the change it will update, this just happens when a change outside of my app is made.

I also tried using a TZReadOnlyQuery with the same results.

The ZConnection has AutoCommit set to True, ReadOnly to False.
ZQuery has the following
AutoCalcFields = True;
CachedUpdates = False;
ShowRecordTypes = [usUnmodified,usModified,usInserted];


Any Ideas on what I am doing wrong. Are is there a bug with TZConnection?

Posted: 14.10.2005, 15:06
by john_pa3erp
Maybe set transaction isolation to ReadCommitted?

Posted: 14.10.2005, 16:56
by glashtin
Worked like a charm. Thank you so much. Did not think it was going to be that easy.