SQLite and FetchAll = False

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
peolsson
Posts: 11
Joined: Thu 30 Apr 2009 07:30

SQLite and FetchAll = False

Post by peolsson » Fri 05 Jun 2009 16:13

Hi,

I've been trying out the new SQLite provider, and it seems to work just fine :)

One little question though, when having FetchAll property set to False and I open a table in TDBGrid I get total number of records 25, instead of showing the real recordcount. I don't see this problem when using MySQL, so it seems to be related to SQLite.

Regards

Peter

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

Post by Plash » Tue 09 Jun 2009 07:59

All providers have such behaviour. You can set the QueryRecCount option of TUniQuery to True. In this case the component queries the actual record count on Open.

peolsson
Posts: 11
Joined: Thu 30 Apr 2009 07:30

Post by peolsson » Thu 11 Jun 2009 10:19

Ok, then there must a problem with the other providers :) They do show the real record count when opening a table. I'm using the exact same TUniConnection, I just change the provider and login/pass/server. For MS SQL, MySQL and PostgreSQL it shows the real count. For SQLite it shows 25.

I simply open a table in a grid.

/Peter

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

Post by Plash » Fri 12 Jun 2009 06:45

SQL Server, MySQL, and PostgreSQL providers have FetchAll = True by default. So they show the real record count.

SQLite, Oracle, and InterBase providers have FetchAll = False by default. So that you should change it to True, or set the QueryRecCount option to True.

supersk
Posts: 3
Joined: Mon 18 Jan 2010 01:51

How to get next 25 Records?

Post by supersk » Tue 26 Jan 2010 09:49

How to get next 25 Records?

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

Post by Plash » Thu 28 Jan 2010 13:20

The next block of records is fetched automatically when you move to a record that was not fetched yet.

Post Reply