Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: ADO: how can u access the number of records in a given table again? Pin
Christian Graus21-Nov-02 16:42
protectorChristian Graus21-Nov-02 16:42 
GeneralRe: ADO: how can u access the number of records in a given table again? Pin
devvvy21-Nov-02 17:13
devvvy21-Nov-02 17:13 
GeneralRe: ADO: how can u access the number of records in a given table again? Pin
Christian Graus21-Nov-02 17:16
protectorChristian Graus21-Nov-02 17:16 
GeneralRe: ADO: how can u access the number of records in a given table again? Pin
devvvy21-Nov-02 17:18
devvvy21-Nov-02 17:18 
GeneralRe: ADO: how can u access the number of records in a given table again? Pin
Christian Graus21-Nov-02 17:22
protectorChristian Graus21-Nov-02 17:22 
GeneralRe: ADO: how can u access the number of records in a given table again? Pin
devvvy21-Nov-02 17:26
devvvy21-Nov-02 17:26 
GeneralRe: ADO: how can u access the number of records in a given table again? Pin
Christian Graus21-Nov-02 17:35
protectorChristian Graus21-Nov-02 17:35 
GeneralRe: ADO: how can u access the number of records in a given table again? Pin
Jon Hulatt21-Nov-02 23:27
Jon Hulatt21-Nov-02 23:27 
Not wise to quote the table pseudonym.

select count(0) as [whatever] from table (nolock)

is the best way to do it in SQL Server.

However, if you're going to select all the data anyway, you'll end up doing two queries which is not necessary. In that case, just select the data and look at Recordset.RecordCount . Only works on client based recordsets though.

#include <beer.h>

GeneralRe: ADO: how can u access the number of records in a given table again? Pin
Nick Parker21-Nov-02 17:35
protectorNick Parker21-Nov-02 17:35 
GeneralRe: ADO: how can u access the number of records in a given table again? Pin
Christian Graus21-Nov-02 17:37
protectorChristian Graus21-Nov-02 17:37 
GeneralRe: ADO: how can u access the number of records in a given table again? Pin
Nick Parker21-Nov-02 17:40
protectorNick Parker21-Nov-02 17:40 
GeneralRe: ADO: how can u access the number of records in a given table again? Pin
Christian Graus21-Nov-02 17:45
protectorChristian Graus21-Nov-02 17:45 
Questionwhy "INT" and not "int" again? Pin
devvvy21-Nov-02 16:22
devvvy21-Nov-02 16:22 
AnswerRe: why "INT" and not "int" again? Pin
Christian Graus21-Nov-02 16:42
protectorChristian Graus21-Nov-02 16:42 
QuestionHow can I display a "save" dialog like GetFileNameFromBrowse does? Pin
Mario M21-Nov-02 16:04
Mario M21-Nov-02 16:04 
GeneralCListCtrl Report-style subitem centering problem Pin
IGx8921-Nov-02 15:52
IGx8921-Nov-02 15:52 
GeneralRe: CListCtrl Report-style subitem centering problem Pin
Gary R. Wheeler23-Nov-02 4:26
Gary R. Wheeler23-Nov-02 4:26 
GeneralMemory leaks Pin
AnTri21-Nov-02 12:02
AnTri21-Nov-02 12:02 
GeneralRe: Memory leaks Pin
Christian Graus21-Nov-02 12:16
protectorChristian Graus21-Nov-02 12:16 
GeneralRe: Memory leaks Pin
AnTri21-Nov-02 21:03
AnTri21-Nov-02 21:03 
GeneralRe: Memory leaks Pin
Christian Graus21-Nov-02 21:14
protectorChristian Graus21-Nov-02 21:14 
GeneralRe: Memory leaks Pin
AnTri21-Nov-02 21:16
AnTri21-Nov-02 21:16 
GeneralRe: Memory leaks Pin
Alexinuk22-Nov-02 0:38
Alexinuk22-Nov-02 0:38 
GeneralRe: Memory leaks Pin
AnTri22-Nov-02 0:55
AnTri22-Nov-02 0:55 
GeneralRe: Memory leaks Pin
Alexinuk22-Nov-02 1:05
Alexinuk22-Nov-02 1:05 

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.