Advertisement

07.10.2005 at 04:30PM PDT, ID: 21486549
[x]
Attachment Details

C# WinForm or Asp.net: foreach DataSet DataReader DataGrid?

Asked by kvnsdr in .NET

Tags: foreach, dataset, datareader

I'm attempting to replace the "listbox1" in this code with a "DataGrid".

foreach(DataRow dataRow in dataSet1.Tables["result"].Rows)
{
    listBox1.Items.Add(dataRow["ArticleUrl"].ToString());  //Displays results from SQL statement
}

Q. How would I code using a DataSet?

Q. How would I code using a DataReader?

Start Free Trial
[+][-]07.10.2005 at 06:25PM PDT, ID: 14408908

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: .NET
Tags: foreach, dataset, datareader
Sign Up Now!
Solution Provided By: athapa
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32