🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3039

Re: Count the displayed records in a DBGrid?

#3039
From: Alen Markov
Date: Fri, 03 Jan 2003 01:06
43 lines
2011 bytes
Ouch - the answer was so simple:

After the SQL statements you can count the filtered rows simply
by calling again "DBGrid1->DataSource->DataSet->RecordCount;"
(It won't display ALL available records in the database now, only the
displayed ones).

Thanks a lot to  Dan Greer for the hint...

Best regards

Alen

--
WEB: http://www.come.to/nostromo



"Alen Markov" <NOSPAM_amarkov@gmx.net> wrote in message
news:3e135e45@newsgroups.borland.com...
> I'd like to count the displayed records in the DBGrid, how to do that?
> (I need something like "DBGrid->RowCount();" )
>
> /*
> I can find out the total available entries for example with something
like:
>
> int iRecords;
> iRecords = DBGrid1->DataSource->DataSet->RecordCount
>
> But let's say after a simple SQL statement only a few hits are displayed
> in my DBGrid - how to find out how many rows are displayed?
> */
>
> Thanks a lot in advance
>
> Best regards
> Alen
>
> --
> WEB: http://www.come.to/nostromo
>
>
Technical Details
Message-ID: <3e14e245@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3e135e45@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,4b4f4179108ae557
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-01-02 17:09:56 PST
From: "Alen Markov" <NOSPAM_amarkov@gmx.net>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3e135e45@newsgroups.borland.com>
Subject: Re: Count the displayed records in a DBGrid?
Date: Fri, 3 Jan 2003 02:06:53 +0100
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 80.218.79.120
Message-ID: <3e14e245@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1041556037 80.218.79.120 (2 Jan 2003 17:07:17 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail