Re: CDatabase CRecordset - How to get the number of rows?
- From: "David++" <David@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 9 Jun 2005 14:29:02 -0700
Hi,
Thanks for both your answers. I've changed my code a bit to this -
CRecordset rs(&db);
rs.Open(CRecordset::forwardOnly,_T( "SELECT * FROM Records" ) );
int count = 0;
while (!rs.IsEOF())
{
count += 1;
rs.MoveNext();
}
I've now dropped the COUNT (*) and have used just * in the SQL Statement. It
seems to be working a little better but i cant fully check it as I'm on my
home computer now. Interestingly, if I use the MoveLast() function I get a
runtime Debug Assertion failure?
Well, thanks once again for your help and views. I'll post any outcomes I
make,
Best,
David
.
- Follow-Ups:
- Re: CDatabase CRecordset - How to get the number of rows?
- From: Roy Fine
- Re: CDatabase CRecordset - How to get the number of rows?
- References:
- Prev by Date: Re: HTTP Client: MFC Sockets or MFC WinInet?
- Next by Date: Cannot open include file
- Previous by thread: Re: CDatabase CRecordset - How to get the number of rows?
- Next by thread: Re: CDatabase CRecordset - How to get the number of rows?
- Index(es):
Relevant Pages
|