Page 1 of 1

Refresh or Close + Open

Posted: Fri 13 Jul 2012 22:20
by Valgardur
I am getting strange behaviour with Refresh on TOraQuery... I was expecting this to be the same as Close + Open but in some cases the data is not refreshed unless I use Open + Close. The 1800+ PDF documentation never discusses Refresh for TOraQuery, and there is nothing in the Delphi XE2 help files.

Re: Refresh or Close + Open

Posted: Mon 16 Jul 2012 09:20
by AlexP
hello,

In order that we can reproduce the problem, please describe it in more details or send a small sample demonstrating the problem (along with the scripts for creating and filling the tables) to alexp*devart*com.

Re: Refresh or Close + Open

Posted: Mon 16 Jul 2012 09:39
by Valgardur
Thanks for a quick reply... the problem is simply that calling Refresh doesn't bring new data while Close + Open does. Before going further - as I cannot find information in the documentation - is my understanding correct that Refresh should do the same as Close + Open?

Re: Refresh or Close + Open

Posted: Tue 17 Jul 2012 10:19
by AlexP
hello,

We cannot reproduce the problem. When calling the Refresh method, the data added to the table is read in DataSet (the call of the Refresh method is similar to Close+Open calls). Please send an application demonstrating the problem to alexp*devart*com, maybe the problem is due to the settings of our components.

Re: Refresh or Close + Open

Posted: Tue 17 Jul 2012 10:31
by Valgardur
I will, as soon as I'm back at my office (3 weeks).. I only have a large application with proprietary structure and data.

But you say Refresh is similar to Close-Open, if there difference at all, it might explain.

In my case, I am reading Oracle tables through a query, and the data being monitored is modified by an external process.

Re: Refresh or Close + Open

Posted: Thu 19 Jul 2012 11:27
by AlexP
hello,

When using the Refresh method, the cursor position is memorized, and after calling this method, the cursor restores in the same position. In other respects, the Refresh method behaves like Close+Open.