record Count ? 
Author Message
 record Count ?

Hi ;
How Can I Get The number of Records in a Data Base ?
I'm Using VC++ 6.0 Under WinNT 4.0 ,And I connect To My DataBase via ODBC to
Microsoft Access .

Thanks in Advance ..
Eyad...



Mon, 10 Mar 2003 03:00:00 GMT  
 record Count ?

Yepp without DAO you have no choice but to open the DB, set cusor to first
record
, move through the DB until EOF and iterate.

a DRAFT looks like

rs.MoveFirst();
while( ! rs.IsEOF() )
{
    rs.MoveNext();
   nCount++;

Quote:
}



Quote:
> Hi ;
> How Can I Get The number of Records in a Data Base ?
> I'm Using VC++ 6.0 Under WinNT 4.0 ,And I connect To My DataBase via ODBC
to
> Microsoft Access .

> Thanks in Advance ..
> Eyad...



Tue, 11 Mar 2003 03:00:00 GMT  
 record Count ?
Moving through a large recordset one record at a time can take a L O N G
time.
Why not let the datbase server do the work?
Use the SQL statement "Select count(*) from tablename".


Quote:

> Yepp without DAO you have no choice but to open the DB, set cusor to first
> record
> , move through the DB until EOF and iterate.

> a DRAFT looks like

> rs.MoveFirst();
> while( ! rs.IsEOF() )
> {
>     rs.MoveNext();
>    nCount++;
> }



> > Hi ;
> > How Can I Get The number of Records in a Data Base ?
> > I'm Using VC++ 6.0 Under WinNT 4.0 ,And I connect To My DataBase via
ODBC
> to
> > Microsoft Access .

> > Thanks in Advance ..
> > Eyad...



Wed, 12 Mar 2003 03:00:00 GMT  
 record Count ?

You can also Open the CDaoRecorset and do a MoveLast then use GetRecordCount()  - make sure to MoveLast or you will get the wrong
number.

_______________________________
Craig Klementowski
Web: www.mediaright.com
_______________________________

Quote:

> Moving through a large recordset one record at a time can take a L O N G
> time.
> Why not let the datbase server do the work?
> Use the SQL statement "Select count(*) from tablename".



> > Yepp without DAO you have no choice but to open the DB, set cusor to first
> > record
> > , move through the DB until EOF and iterate.

> > a DRAFT looks like

> > rs.MoveFirst();
> > while( ! rs.IsEOF() )
> > {
> >     rs.MoveNext();
> >    nCount++;
> > }



> > > Hi ;
> > > How Can I Get The number of Records in a Data Base ?
> > > I'm Using VC++ 6.0 Under WinNT 4.0 ,And I connect To My DataBase via
> ODBC
> > to
> > > Microsoft Access .

> > > Thanks in Advance ..
> > > Eyad...



Fri, 14 Mar 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Getting Record Count in SqlDataReader

2. HELP,How can I get the records count use DAO classes

3. Stored Proc that returns record count ...

4. Can I get the record count quickly?

5. Problems with OLE DB and ODBC getting record counts in C++

6. ADO record count always returns a -1

7. Speeding record count procedure

8. Fast Record Counting ?

9. Can I get the record count quickly?

10. How can I use ODBC API to move last and get record count???

11. How do I get a record count for an ODBC query resultset?

12. How can I use ODBC API to move last and get record count of a recordset???

 

 
Powered by phpBB® Forum Software