OraQuery FetchAll=false and Refresh

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
neonomaly
Posts: 4
Joined: Thu 16 Jun 2011 10:23

OraQuery FetchAll=false and Refresh

Post by neonomaly » Sat 25 Jun 2011 09:30

I have opened oraquery with 100k(about 1k loaded) records and fetchall=false.

Then I use orasql for modify data in this query and I then i use oraquery.refresh

Sometimes oraquery begins to fetch all data in query (100k), but I need to refresh only fetched data...

I am doing something wrong or it is bug of odac?

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

Post by AlexP » Mon 27 Jun 2011 14:42

Hello,

Such behaviour is determined by the fact that when the Refresh method is called, the Locate method is called to set cursor to the same record it was on before calling Refresh. And as the Locate method goes through all values to find the needed one and this record does not exist any more, we pass all records and that's why we get such amount of data.

Try to close the query and open it once more instead of using the Refresh method.

Post Reply