Refresh or Close + Open

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Valgardur
Posts: 165
Joined: Tue 24 Nov 2009 19:33

Refresh or Close + Open

Post by Valgardur » Fri 13 Jul 2012 22:20

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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Refresh or Close + Open

Post by AlexP » Mon 16 Jul 2012 09:20

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.

Valgardur
Posts: 165
Joined: Tue 24 Nov 2009 19:33

Re: Refresh or Close + Open

Post by Valgardur » Mon 16 Jul 2012 09:39

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?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Refresh or Close + Open

Post by AlexP » Tue 17 Jul 2012 10:19

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.

Valgardur
Posts: 165
Joined: Tue 24 Nov 2009 19:33

Re: Refresh or Close + Open

Post by Valgardur » Tue 17 Jul 2012 10:31

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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Refresh or Close + Open

Post by AlexP » Thu 19 Jul 2012 11:27

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.

Post Reply