Re: CDatabase CRecordset - How to get the number of rows?
- From: "David++" <David@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 10 Jun 2005 05:48:03 -0700
Ok, I tried this way but now instead of getting 3 rows returned (which is how
many rows there are in my table), I now get 14549040 rows returned? Hmm, any
ideas?
Thanks,
David
> Consider something like this (which pushes most of the work to the database
> server and fetches one row with one field):
>
> CRecordset rs(&db);
> rs.Open(CRecordset::ForwardOnly,"Select count(*) from
> Records",CRecordset::ReadOnly);
> CDBVariant vtval;
> rs.GetFieldValue((short)0,vtval);
> int rowcount = vtval.m_lVal;
> rs.Close();
>
>
> regards
> Roy Fine
>
>
>
.
- 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:
- CDatabase CRecordset - How to get the number of rows?
- From: David++
- Re: CDatabase CRecordset - How to get the number of rows?
- From: Gert
- Re: CDatabase CRecordset - How to get the number of rows?
- From: David++
- Re: CDatabase CRecordset - How to get the number of rows?
- From: Roy Fine
- CDatabase CRecordset - How to get the number of rows?
- Prev by Date: Strange MDI application error
- Next by Date: Re: CDatabase CRecordset - How to get the number of rows?
- 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
|
Loading