Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: better datastructure for storage? Pin
AETaylor18-Dec-05 21:09
AETaylor18-Dec-05 21:09 
QuestionStructure conversion Pin
peppepinna16-Dec-05 0:23
peppepinna16-Dec-05 0:23 
AnswerRe: Structure conversion Pin
Nick Parker16-Dec-05 6:02
protectorNick Parker16-Dec-05 6:02 
QuestionCount the number of rows with sqldatareader Pin
Genbox16-Dec-05 0:03
Genbox16-Dec-05 0:03 
AnswerRe: Count the number of rows with sqldatareader Pin
J4amieC16-Dec-05 0:26
J4amieC16-Dec-05 0:26 
GeneralRe: Count the number of rows with sqldatareader Pin
Genbox16-Dec-05 1:00
Genbox16-Dec-05 1:00 
GeneralRe: Count the number of rows with sqldatareader Pin
J4amieC16-Dec-05 1:22
J4amieC16-Dec-05 1:22 
GeneralRe: Count the number of rows with sqldatareader Pin
Genbox17-Dec-05 3:49
Genbox17-Dec-05 3:49 
Thanks, it sort of works. :S

Cant i use the same SqlCommand to extract data from the tabel ?

if i exec this:

while (rdr.Read())
{
Response.Write(rdr["TrainingCount"].ToString());
}

then it returns the number of rows like it should, but if i read any data from the table, then it returns an error. - this is the code:

while (rdr.Read())
{
Response.Write(rdr["TrainingCount"].ToString());
Response.Write(rdr[1]);
}

And this is the error:
System.IndexOutOfRangeException: Index was outside the bounds of the array.

Do i really have to make 2 SqlCommands, one that counts and one that i can get data from? that dosent seem right to me.
QuestionTool to detect boxing/unboxing? Pin
LiamD15-Dec-05 23:05
LiamD15-Dec-05 23:05 
AnswerRe: Tool to detect boxing/unboxing? Pin
Heath Stewart16-Dec-05 5:58
protectorHeath Stewart16-Dec-05 5:58 
Questionfree C# 2005 ebook Pin
mehrdadc4815-Dec-05 22:23
mehrdadc4815-Dec-05 22:23 
AnswerRe: free C# 2005 ebook Pin
leppie15-Dec-05 22:37
leppie15-Dec-05 22:37 
GeneralRe: free C# 2005 ebook Pin
HakunaMatada15-Dec-05 23:34
HakunaMatada15-Dec-05 23:34 
AnswerRe: free C# 2005 ebook Pin
albCode16-Dec-05 4:34
albCode16-Dec-05 4:34 
AnswerRe: free C# 2005 ebook Pin
Gulfraz Khan16-Dec-05 6:00
Gulfraz Khan16-Dec-05 6:00 
Answer[Message Removed] Pin
hankjmatt13-Oct-08 21:18
hankjmatt13-Oct-08 21:18 
QuestionURGENT DATAGRID TAB KEY PROBLEM Pin
Greeky15-Dec-05 21:56
Greeky15-Dec-05 21:56 
QuestionAsynchronous call Pin
fmardani15-Dec-05 21:52
fmardani15-Dec-05 21:52 
AnswerRe: Asynchronous call Pin
leppie15-Dec-05 22:41
leppie15-Dec-05 22:41 
GeneralRe: Asynchronous call Pin
fmardani15-Dec-05 22:46
fmardani15-Dec-05 22:46 
QuestionWrite an xml node in a specific position Pin
hellamasta15-Dec-05 21:32
hellamasta15-Dec-05 21:32 
AnswerRe: Write an xml node in a specific position Pin
Heath Stewart15-Dec-05 21:49
protectorHeath Stewart15-Dec-05 21:49 
GeneralRe: Write an xml node in a specific position Pin
hellamasta15-Dec-05 22:17
hellamasta15-Dec-05 22:17 
GeneralRe: Write an xml node in a specific position Pin
Heath Stewart16-Dec-05 5:49
protectorHeath Stewart16-Dec-05 5:49 
GeneralRe: Write an xml node in a specific position Pin
hellamasta16-Dec-05 0:03
hellamasta16-Dec-05 0:03 

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.