Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
QuestionAsymmetric Encryption of File Pin
Vasudevan Deepak Kumar22-Feb-07 7:07
Vasudevan Deepak Kumar22-Feb-07 7:07 
QuestionWebBrowser Control Pin
zaboboa22-Feb-07 6:22
zaboboa22-Feb-07 6:22 
AnswerRe: WebBrowser Control Pin
Ravi Bhavnani22-Feb-07 6:32
professionalRavi Bhavnani22-Feb-07 6:32 
GeneralRe: WebBrowser Control Pin
zaboboa22-Feb-07 7:16
zaboboa22-Feb-07 7:16 
GeneralRe: WebBrowser Control Pin
Ravi Bhavnani22-Feb-07 7:27
professionalRavi Bhavnani22-Feb-07 7:27 
GeneralRe: WebBrowser Control Pin
zaboboa22-Feb-07 7:32
zaboboa22-Feb-07 7:32 
GeneralRe: WebBrowser Control Pin
Ravi Bhavnani22-Feb-07 7:38
professionalRavi Bhavnani22-Feb-07 7:38 
QuestionDataTableReader is invalid for current DataTable Pin
bemahesh22-Feb-07 5:50
bemahesh22-Feb-07 5:50 
hi, I am trying to get the data from datatable in to DataTableReader so i can read the data like datareader.

I am getting error "DataTableReader is invalid for current DataTable" when trying to call the GetValues method on DataTableReader.

Please shed some light. If it helps here is my code in C# 2.0

public void Execute()
{

using (DataTableReader dataTableReader = new DataTableReader(myDataTable))
{
object[] values = new object[dataTableReader.FieldCount];

int fieldCount = dataTableReader.GetValues(values);
string id= values[4].ToString();
string Type = values[0].ToString();

}

}

i am poppulating a datatable from SQL 2000 database and is getting 4 rows back ( i can see that in datatable viewer in debug mode). I am also able to get the field count on datatableReader which is 6 (=number of columns).

However, when i get to the point where i need to get the values from the dataTableReader using
dataTableReader.GetValues(values), that's where it breaks up and states "DataTableReader is invalid for current DataTable"

Please shed some light

Thanks
Needy

QuestionBig html string. How to store them? [modified] Pin
Scripter4722-Feb-07 5:28
Scripter4722-Feb-07 5:28 
AnswerRe: Big html string. How to store them? Pin
Ravi Bhavnani22-Feb-07 6:32
professionalRavi Bhavnani22-Feb-07 6:32 
GeneralRe: Big html string. How to store them? Pin
Scripter4722-Feb-07 7:22
Scripter4722-Feb-07 7:22 
GeneralRe: Big html string. How to store them? Pin
Stefan Troschuetz22-Feb-07 7:31
Stefan Troschuetz22-Feb-07 7:31 
GeneralRe: Big html string. How to store them? Pin
Ravi Bhavnani22-Feb-07 7:32
professionalRavi Bhavnani22-Feb-07 7:32 
GeneralRe: Big html string. How to store them? Pin
Luc Pattyn22-Feb-07 7:33
sitebuilderLuc Pattyn22-Feb-07 7:33 
GeneralRe: Big html string. How to store them? Pin
Scripter4722-Feb-07 7:45
Scripter4722-Feb-07 7:45 
QuestionHow to change border (frame) color on a Form? Pin
ClarreW22-Feb-07 5:08
ClarreW22-Feb-07 5:08 
AnswerRe: How to change border (frame) color on a Form? Pin
Dave Kreskowiak22-Feb-07 8:51
mveDave Kreskowiak22-Feb-07 8:51 
GeneralRe: How to change border (frame) color on a Form? Pin
ClarreW22-Feb-07 20:16
ClarreW22-Feb-07 20:16 
QuestionEventHandler not Fire Pin
mfcuser22-Feb-07 5:07
mfcuser22-Feb-07 5:07 
AnswerRe: EventHandler not Fire Pin
Colin Angus Mackay22-Feb-07 5:21
Colin Angus Mackay22-Feb-07 5:21 
GeneralRe: EventHandler not Fire Pin
mfcuser22-Feb-07 5:31
mfcuser22-Feb-07 5:31 
AnswerRe: EventHandler not Fire Pin
Ravi Bhavnani22-Feb-07 6:37
professionalRavi Bhavnani22-Feb-07 6:37 
GeneralRe: EventHandler not Fire Pin
mfcuser22-Feb-07 7:12
mfcuser22-Feb-07 7:12 
QuestionError Message in CD Burning program Pin
shahzeb8522-Feb-07 4:56
shahzeb8522-Feb-07 4:56 
AnswerRe: Error Message in CD Burning program Pin
Judah Gabriel Himango22-Feb-07 4:59
sponsorJudah Gabriel Himango22-Feb-07 4:59 

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.