Refresh dataset

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
burdian
Posts: 29
Joined: Wed 19 Nov 2008 19:25

Refresh dataset

Post by burdian » Thu 20 Nov 2008 18:32

Hi,

UniQuery with standard DBGrid.
UniQuery.SQL = 'select * from TAB1 order by ID'
UniQuery.SpecificOptions.FetchAll = False or True.

TAB1 must have enough records for some grid pages.

With Firebird and Oracle:
after UniQuery.Refresh selected row become first or last row on the grid page.

No problems with MSSQL.

TIA and Best regards
Branko

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 21 Nov 2008 11:19

This is the normal behaviour of dataset because the Resync method is called during refresh. If we remove this call, the problems may occur (such as access violation).

burdian
Posts: 29
Joined: Wed 19 Nov 2008 19:25

Post by burdian » Fri 21 Nov 2008 13:26

Hi,
Plash wrote:This is the normal behaviour of dataset because the Resync method is called during refresh. If we remove this call, the problems may occur (such as access violation).
No, Resync method should not be removed! You should investigate how procedure GetRecord is implemented (how it gets prior, current next record in this situation).

We have tested this with standard DBGrid.

Just drop DbGrid, DbNavigator, UniQuery, DataSource. Run application
and click Refresh button in DbNavigator on some record in the middle
of DbGrid (table should have 50 or more records).

You get:
1. scroll bar disappear
2. selected record in the middle of grid becomes first record

When provider is MSSQL then it works perfect, as expected !!!!
You will not see this with BDE or some other components.

I must congratulate you for excelent product.

Best Regards,
Branko

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 24 Nov 2008 08:53

We are working on this problem. You will be notified when we fix it.

Post Reply