Subject | Re: [IBO] Cursor.RecordCount |
---|---|
Author | Jason Wharton |
Post date | 2001-01-20T02:55:52Z |
This is extremely inefficient. For each iteration of the loop you will get a
query being sent to the server re-determining the record count.
Please use a while loop and check for Eof.
I think I would like to see a sample app of why this is acting the way it is
because it should be right.
Oh, except for one thing, the EOF row will count as one.
Anyway, I'll put this in the folder indicating that a demo is needed.
Thanks,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
query being sent to the server re-determining the record count.
Please use a while loop and check for Eof.
I think I would like to see a sample app of why this is acting the way it is
because it should be right.
Oh, except for one thing, the EOF row will count as one.
Anyway, I'll put this in the folder indicating that a demo is needed.
Thanks,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: <guido.klapperich@...>
To: <ibobjects@egroups.com>
Sent: Friday, January 12, 2001 5:13 AM
Subject: [IBO] Cursor.RecordCount
> When I open a IB_Cursor, I get only 6 rows, when I go to the last
> record, but Recordcount has the value 8. The problem is, that I walk
> through the Cursor like this:
> Cursor.APIFirst;
> for i:=1 to Cursor.RecordCount do
> begin
> TreeView.Items.AddChild(Node,Cursor.Fields[0].AsString);
> Cursor.APINext;
> end;
>
> There are only 6 rows, but RecordCount is 8. Any ideas?
>
>
> Guido.
>
>
>
>