IBDAC Fetch Manual

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
wesleybobato
Posts: 19
Joined: Thu 13 Feb 2014 12:28

IBDAC Fetch Manual

Post by wesleybobato » Thu 07 May 2015 12:38

Hello Support could please help me?

QrySQL.FetchRows: = 1;
qrySQL.Fetchall: = False;
qrySQL.Open;

the following command does not work

qrysql.fetchall?

any tips?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: IBDAC Fetch Manual

Post by ViktorV » Fri 08 May 2015 08:08

TIBCQuery.FetchAll is not a method for returning all records, but a property to define whether all records will be read on opening dataset. If FetchAll = False, only FetchRows of rows will be read during the fetch of the TIBCQuery.Open method. The rest of the rows will be fetched on demand. If you would like to read all rows of the query when opening it, set FetchAll in True. You can read about it in the IBDAC help: http://www.devart.com/ibdac/docs/#devar ... tchall.htm

wesleybobato
Posts: 19
Joined: Thu 13 Feb 2014 12:28

Re: IBDAC Fetch Manual

Post by wesleybobato » Sat 09 May 2015 21:24

Hello Supporte.

Thank you for your attention.

You could add a method to bring all records in the next version?

FetchAllRecords Method is possible?

Many Thanks.

marcodor
Posts: 29
Joined: Tue 29 Oct 2013 20:30

Re: IBDAC Fetch Manual

Post by marcodor » Mon 11 May 2015 11:41

Take a look at FetchAll method or just set Option.FetchAll=True and it will fetch all records automatically on Open.

wesleybobato
Posts: 19
Joined: Thu 13 Feb 2014 12:28

Re: IBDAC Fetch Manual

Post by wesleybobato » Mon 11 May 2015 13:14

Hello marcodor

unfortunately this Method, fetchall does not exist.

What Unit Name that this method? IBC.pas?

There is only one Boolean Property.

I would like to Use a Method and not change the property to True.

Thank you for your attention.

marcodor
Posts: 29
Joined: Tue 29 Oct 2013 20:30

Re: IBDAC Fetch Manual

Post by marcodor » Mon 11 May 2015 18:22

Ops, I'm coming from FibPlus, it have such method.
So, as a workaround you may define your own ancestor based on TIBCQuery and add FetchAllRecords method with simple implementation like:

Code: Select all

var B: TBookmark;
begin
  DisableControls;
  try
    B := GetBookmark;
    Last;
    GotoBookmark(B);
    FreeBookmark(B); // May be obsolete, see help
  finally
    EnableControls;
  end;
end
But why you really need this if there is FetchAll property?
Usually you need "to fetch all" or "not to fetch all" before opening dataset, so in most cases a property is enough.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: IBDAC Fetch Manual

Post by ViktorV » Tue 12 May 2015 12:51

wesleybobato wrote:Hello Supporte.

Thank you for your attention.

You could add a method to bring all records in the next version?

FetchAllRecords Method is possible?

Many Thanks.
If you want us to implement the feature, please post it at our user voice forum: https://devart.uservoice.com/forums/104 ... e-firebird. If the suggestion gets a lot of votes, we will consider the possibility to implement it.

Post Reply