Click here to Skip to main content
15,922,650 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionVB DLL Question Pin
yoya03034-Oct-07 22:08
yoya03034-Oct-07 22:08 
AnswerRe: VB DLL Question Pin
Dave Kreskowiak5-Oct-07 1:52
mveDave Kreskowiak5-Oct-07 1:52 
GeneralRe: VB DLL Question Pin
yoya03035-Oct-07 2:15
yoya03035-Oct-07 2:15 
GeneralRe: VB DLL Question Pin
Dave Kreskowiak5-Oct-07 3:50
mveDave Kreskowiak5-Oct-07 3:50 
GeneralRe: VB DLL Question Pin
yoya03035-Oct-07 4:06
yoya03035-Oct-07 4:06 
QuestionData reader (need your help guys) Pin
dienadel4-Oct-07 15:43
dienadel4-Oct-07 15:43 
AnswerRe: Data reader (need your help guys) Pin
Christian Graus4-Oct-07 19:10
protectorChristian Graus4-Oct-07 19:10 
AnswerRe: Data reader (need your help guys) Pin
Dave Kreskowiak5-Oct-07 1:49
mveDave Kreskowiak5-Oct-07 1:49 
In a DataReader, there is no way to tell how many records it's going to read. It's a forward-only reader that returns rows, one at a time. It doesn't know how many are going to be returned.

Like Christian said, you can execute the same query with a COUNT expression in the SQL statement returning the exact same rows with the same WHERE clause, then execute your DataReader.

Or, you can count the number of rows returned AS they are returned by the DataReader.

Or, scrap the DataReader entirely and use a DataAdapter to fill a DataTable object that will tell you the number of rows it's holding.


A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: Data reader (need your help guys) Pin
dienadel7-Oct-07 19:51
dienadel7-Oct-07 19:51 
QuestionForms Handling Issue Pin
nlarson114-Oct-07 11:18
nlarson114-Oct-07 11:18 
AnswerRe: Forms Handling Issue Pin
Johan Hakkesteegt5-Oct-07 0:13
Johan Hakkesteegt5-Oct-07 0:13 
GeneralRe: Forms Handling Issue Pin
nlarson115-Oct-07 3:04
nlarson115-Oct-07 3:04 
GeneralRe: Forms Handling Issue Pin
Johan Hakkesteegt5-Oct-07 3:14
Johan Hakkesteegt5-Oct-07 3:14 
QuestionReport from SQL Server with Vb.NET Pin
mhaneefa4-Oct-07 9:41
mhaneefa4-Oct-07 9:41 
AnswerRe: Report from SQL Server with Vb.NET Pin
Johan Hakkesteegt5-Oct-07 0:16
Johan Hakkesteegt5-Oct-07 0:16 
GeneralRe: Report from SQL Server with Vb.NET Pin
mhaneefa5-Oct-07 9:53
mhaneefa5-Oct-07 9:53 
QuestionGet Access() [modified] Pin
zchwllms4-Oct-07 9:28
zchwllms4-Oct-07 9:28 
AnswerRe: Get Access() Pin
balaji baskar4-Oct-07 13:24
balaji baskar4-Oct-07 13:24 
QuestionArray Sort Pin
Scott_Roberts4-Oct-07 8:51
Scott_Roberts4-Oct-07 8:51 
AnswerRe: Array Sort Pin
nlarson114-Oct-07 10:29
nlarson114-Oct-07 10:29 
QuestionSelecting multipe parameters Pin
TAK784-Oct-07 7:24
TAK784-Oct-07 7:24 
AnswerRe: Selecting multipe parameters Pin
Dave Kreskowiak5-Oct-07 1:45
mveDave Kreskowiak5-Oct-07 1:45 
QuestionSMO Sample Pin
Naderrafiee4-Oct-07 6:08
Naderrafiee4-Oct-07 6:08 
AnswerRe: SMO Sample Pin
Dave Kreskowiak5-Oct-07 1:44
mveDave Kreskowiak5-Oct-07 1:44 
QuestionVB/ASP problem - HTML strings in ASP Pin
Dmitry Khudorozhkov4-Oct-07 5:51
Dmitry Khudorozhkov4-Oct-07 5:51 

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.