Click here to Skip to main content
15,891,738 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Addition MultiDocument/View architecture to ActiveX Pin
Roger Stoltz16-May-06 9:27
Roger Stoltz16-May-06 9:27 
QuestionAm I doing wrong? Pin
ppatel56715-May-06 20:31
ppatel56715-May-06 20:31 
AnswerRe: Am I doing wrong? Pin
Michael Dunn15-May-06 21:17
sitebuilderMichael Dunn15-May-06 21:17 
GeneralRe: Am I doing wrong? Pin
ppatel56715-May-06 21:20
ppatel56715-May-06 21:20 
GeneralRe: Am I doing wrong? Pin
Stephen Hewitt15-May-06 22:03
Stephen Hewitt15-May-06 22:03 
GeneralRe: Am I doing wrong? Pin
Hamid_RT15-May-06 22:44
Hamid_RT15-May-06 22:44 
GeneralRe: Am I doing wrong? Pin
Stephen Hewitt15-May-06 23:58
Stephen Hewitt15-May-06 23:58 
QuestionGetting the number of records in a recordset Pin
SWDevil15-May-06 20:26
SWDevil15-May-06 20:26 
hi,

I have a recordset which contains the results of a query, and I want to get the number of records in the recordset.

I tried to use the GetRecordCount function, but I understood that I have to go through the whole recordset in order to get the number of records. So I have this loop in my code which is very inefficient:
while (!pSet->IsEOF()) //pSet is a pointer to the recordset
pSet->MoveNext();

I thouhgt to do an SQL query using COUNT, but it requires a simple query (something like: SELECT COUNT (*) FROM Table1 ) and my query is not a simple one. It contains selection of a number of records, and Inner joins of tables and an ORDER BY clause.

Is there another way to get the number of records in a recordset? Any suggestions?

AnswerRe: Getting the number of records in a recordset Pin
Monty215-May-06 20:30
Monty215-May-06 20:30 
GeneralRe: Getting the number of records in a recordset Pin
SWDevil15-May-06 20:42
SWDevil15-May-06 20:42 
GeneralRe: Getting the number of records in a recordset Pin
psramu15-May-06 21:05
psramu15-May-06 21:05 
GeneralRe: Getting the number of records in a recordset Pin
SWDevil15-May-06 21:34
SWDevil15-May-06 21:34 
GeneralRe: Getting the number of records in a recordset Pin
David Crow16-May-06 2:46
David Crow16-May-06 2:46 
GeneralRe: Getting the number of records in a recordset Pin
SWDevil16-May-06 3:23
SWDevil16-May-06 3:23 
QuestionRe: Getting the number of records in a recordset Pin
David Crow16-May-06 4:30
David Crow16-May-06 4:30 
AnswerRe: Getting the number of records in a recordset Pin
SWDevil16-May-06 19:35
SWDevil16-May-06 19:35 
GeneralRe: Getting the number of records in a recordset Pin
David Crow17-May-06 2:44
David Crow17-May-06 2:44 
GeneralRe: Getting the number of records in a recordset Pin
SWDevil17-May-06 5:14
SWDevil17-May-06 5:14 
AnswerRe: Getting the number of records in a recordset Pin
David Crow16-May-06 2:51
David Crow16-May-06 2:51 
GeneralRe: Getting the number of records in a recordset Pin
SWDevil16-May-06 3:24
SWDevil16-May-06 3:24 
GeneralRe: Getting the number of records in a recordset Pin
David Crow16-May-06 4:29
David Crow16-May-06 4:29 
QuestionWriting an Optimiser Pin
RichardS15-May-06 20:18
RichardS15-May-06 20:18 
Questionhow to create a folder automatically Pin
ramyasangeet15-May-06 20:17
ramyasangeet15-May-06 20:17 
AnswerRe: how to create a folder automatically Pin
Cedric Moonen15-May-06 20:30
Cedric Moonen15-May-06 20:30 
GeneralRe: how to create a folder automatically Pin
ramyasangeet15-May-06 20:45
ramyasangeet15-May-06 20:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.