ADO.Net Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 338 Page Views: 

How do you create dataset object and populate it with data from c# code?



Posted By: Avi Date: 14 October 2010 01:54:47 PM
 Answer:

DataSet ds = new DataSet(); ds.Tables.Add(new DataTable()); ds.Tables[0].Columns.Add(“col1”); ds.Tables[0].Rows.Add(ds.Tables[0].NewRow());


Posted By: avibtech


Date: 14 October 2010 01:54:47 PM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image zqE0vh
Related Questions
ADO.Net : How do you check number of rows affected by update query?

How do you check number of rows affected by update query?

ExecuteNonQuery Method on SqlCommand returns number of rows affected.
Category: ADO.Net Date: 10/14/2010 5:01:48 AM
ADO.Net : What is Entity Framework?

What is Entity Framework?

ADO.NET Entity Framework is an object-relational mappin framework
Category: ADO.Net Date: 10/14/2010 4:09:47 AM
ADO.Net : Can DataGridView use DataSet as data source?

Can DataGridView use DataSet as data source?

Yes
Category: ADO.Net Date: 10/14/2010 4:09:47 AM
ADO.Net : Can you edit XML data using XPathNavigator created from XPathDocument class?
ADO.Net : Can you serialize dataset instance?

Can you serialize dataset instance?

yes
Category: ADO.Net Date: 10/13/2010 11:37:48 PM