FetchAll-Problem!?

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
michaelJ
Posts: 30
Joined: Thu 13 Jan 2011 16:11

FetchAll-Problem!?

Post by michaelJ » Tue 19 Apr 2011 09:29

Hello,

when I get some data from a table with

Code: Select all

  IBCQuery.SQL.Text:=('select * from users where kontosperre1 order by namenskuerzel');
  IBCQuery.open;
  IBCQuery.FetchAll;
  IBCQuery.First;
I've got as result RecordCount=25. But the Table contains 45 entries.

But when i Use

Code: Select all

  DM.Q_Tmp.Last;  //IBDAC
  DM.Q_Tmp.First;
I've got the correct count of entries? What's going wrong?
Why didn't get 'FetchAll' all entries?

Michael

AndreyZ

Post by AndreyZ » Tue 19 Apr 2011 11:48

Hello,

To fetch all records you should set the FetchAll property to True as follows:

Code: Select all

IBCQuery.SQL.Text := ('select * from users where kontosperre1 order by namenskuerzel');
IBCQuery.FetchAll := True;
IBCQuery.Open;
For more information, please read the IBDAC documentation.

michaelJ
Posts: 30
Joined: Thu 13 Jan 2011 16:11

Post by michaelJ » Thu 21 Apr 2011 08:14

It works! Thank You!

Michael

Post Reply