Click here to Skip to main content
15,914,943 members
Home / Discussions / Database
   

Database

 
GeneralRe: @@Identity.....Help Me somebody Pin
Daniel Turini21-Oct-02 21:53
Daniel Turini21-Oct-02 21:53 
GeneralRe: @@Identity.....Help Me somebody Pin
Morten Abrahamsen22-Oct-02 1:37
Morten Abrahamsen22-Oct-02 1:37 
GeneralRe: @@Identity.....Help Me somebody Pin
Daniel Turini22-Oct-02 1:42
Daniel Turini22-Oct-02 1:42 
GeneralRe: @@Identity.....Help Me somebody Pin
Morten Abrahamsen22-Oct-02 1:48
Morten Abrahamsen22-Oct-02 1:48 
GeneralBinding null Dates Pin
Derek Lakin21-Oct-02 4:25
Derek Lakin21-Oct-02 4:25 
GeneralGetting the row count from a SQLDataReader Pin
Paul Watson21-Oct-02 4:22
sitebuilderPaul Watson21-Oct-02 4:22 
GeneralRe: Getting the row count from a SQLDataReader Pin
Ray Cassick21-Oct-02 6:42
Ray Cassick21-Oct-02 6:42 
GeneralRe: Getting the row count from a SQLDataReader Pin
Daniel Turini21-Oct-02 22:09
Daniel Turini21-Oct-02 22:09 
You can't, because it's a forward-only cursor.

Paul Watson wrote:
But now I have just realised I cannot figure out how to get a row count from the reader without actually looping through it, which bites because I need the rowcount before I loop so that I can initialise a collection array. Doh.

You can create an ArrayList and, at the end, use the ArrayList.CopyTo method for copying it to typed array.

Since this will only copy object references, not the actual values, it's very fast. Normally much, much faster than a SQL count.


Q261186 - Computer Randomly Plays Classical Music
GeneralRe: Getting the row count from a SQLDataReader Pin
Paul Watson21-Oct-02 22:17
sitebuilderPaul Watson21-Oct-02 22:17 
GeneralRe: Getting the row count from a SQLDataReader Pin
Morten Abrahamsen22-Oct-02 1:43
Morten Abrahamsen22-Oct-02 1:43 
GeneralRe: Getting the row count from a SQLDataReader Pin
Daniel Turini22-Oct-02 1:45
Daniel Turini22-Oct-02 1:45 
GeneralRe: Getting the row count from a SQLDataReader Pin
Morten Abrahamsen22-Oct-02 1:58
Morten Abrahamsen22-Oct-02 1:58 
GeneralRe: Getting the row count from a SQLDataReader Pin
Daniel Turini22-Oct-02 2:14
Daniel Turini22-Oct-02 2:14 
GeneralRe: Getting the row count from a SQLDataReader Pin
Morten Abrahamsen22-Oct-02 2:23
Morten Abrahamsen22-Oct-02 2:23 
GeneralRe: Getting the row count from a SQLDataReader Pin
Daniel Turini22-Oct-02 2:26
Daniel Turini22-Oct-02 2:26 
GeneralRe: Getting the row count from a SQLDataReader Pin
Morten Abrahamsen22-Oct-02 2:40
Morten Abrahamsen22-Oct-02 2:40 
GeneralRe: Getting the row count from a SQLDataReader Pin
Daniel Turini22-Oct-02 2:51
Daniel Turini22-Oct-02 2:51 
GeneralRe: Getting the row count from a SQLDataReader Pin
Morten Abrahamsen22-Oct-02 8:19
Morten Abrahamsen22-Oct-02 8:19 
GeneralProblem with Composite Attribute in access Pin
tongc20-Oct-02 20:56
tongc20-Oct-02 20:56 
GeneralRetrieving Exchange Information Pin
Anonymous20-Oct-02 18:39
Anonymous20-Oct-02 18:39 
GeneralRe: Retrieving Exchange Information Pin
Morten Abrahamsen22-Oct-02 1:59
Morten Abrahamsen22-Oct-02 1:59 
QuestionCan I query an XML file with SQL? Pin
Marc Clifton20-Oct-02 14:35
mvaMarc Clifton20-Oct-02 14:35 
AnswerRe: Can I query an XML file with SQL? Pin
Nick Parker20-Oct-02 16:21
protectorNick Parker20-Oct-02 16:21 
AnswerRe: Can I query an XML file with SQL? Pin
Daniel Turini20-Oct-02 22:35
Daniel Turini20-Oct-02 22:35 
GeneralRe: Can I query an XML file with SQL? Pin
Nick Parker21-Oct-02 1:50
protectorNick Parker21-Oct-02 1:50 

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.