M
Mick Walker
I am attempting to write some information contained in a datatable to a
textbox on my form.
I do it like this:
// get the number of columns
int intCols = myDataSet.Tables[0].Columns.Count;
// get the number of rows
int intRows = myDataSet.Tables[0].Rows.Count;
foreach (DataRow row in myDataSet.Tables[0].Rows) {
for(int i = 0; i < intCols ; i++) {
textBox2.Text += (string) row + " , ";
}
textBox2.Text += Environment.NewLine;
}
It is taking a VERY long time, over 10 mins for less than 2000 rows.
Does anyone have any siggestions on making this faster?
textbox on my form.
I do it like this:
// get the number of columns
int intCols = myDataSet.Tables[0].Columns.Count;
// get the number of rows
int intRows = myDataSet.Tables[0].Rows.Count;
foreach (DataRow row in myDataSet.Tables[0].Rows) {
for(int i = 0; i < intCols ; i++) {
textBox2.Text += (string) row + " , ";
}
textBox2.Text += Environment.NewLine;
}
It is taking a VERY long time, over 10 mins for less than 2000 rows.
Does anyone have any siggestions on making this faster?