Page 1 of 1

FetchAll-Problem!?

Posted: Tue 19 Apr 2011 09:29
by michaelJ
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

Posted: Tue 19 Apr 2011 11:48
by AndreyZ
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.

Posted: Thu 21 Apr 2011 08:14
by michaelJ
It works! Thank You!

Michael