Board index » delphi » recordcount

recordcount

Hello-

I have a tquery with a request live option set.
When I set active to true and an empty dataset is returned
the recordcount doesnt indicate zero.
I tried browsing the manual and online help awhile.
I figured I'd post because the lightning might be coming and it looks
like I might run out of time to figure this out.

thanks
jim

 

Re:recordcount


right after I posted I came up with this generic solution.
thanks anyways
jim

var
i: integer;

begin
i:=0;
query2.first;
while not query2.eof do
begin
inc(i);
query2.next;
end;
showmessage(inttostr(i));

Quote
Eoyore wrote:
> Hello-

> I have a tquery with a request live option set.
> When I set active to true and an empty dataset is returned
> the recordcount doesnt indicate zero.
> I tried browsing the manual and online help awhile.
> I figured I'd post because the lightning might be coming and it looks
> like I might run out of time to figure this out.

> thanks
> jim

Re:recordcount


You can also check IsEmpty
Quote
Eoyore <m...@slic.com> wrote in message news:394B4004.8552E515@slic.com...
> right after I posted I came up with this generic solution.
> thanks anyways
> jim

> var
> i: integer;

> begin
> i:=0;
> query2.first;
> while not query2.eof do
> begin
> inc(i);
> query2.next;
> end;
> showmessage(inttostr(i));

> Eoyore wrote:

> > Hello-

> > I have a tquery with a request live option set.
> > When I set active to true and an empty dataset is returned
> > the recordcount doesnt indicate zero.
> > I tried browsing the manual and online help awhile.
> > I figured I'd post because the lightning might be coming and it looks
> > like I might run out of time to figure this out.

> > thanks
> > jim

Other Threads