ADO.Net Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 968 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 CBGjEd
Related Questions
ADO.Net : What is MARS technology?

What is MARS technology?

Multiple Active Results Sets. It’s a technology that allow applications to maintain multiple active ....
Category: ADO.Net Date: 10/14/2010 1:11:48 PM
ADO.Net : How do use CommandBuilder class?

How do use CommandBuilder class?

CommandBuilder objects generates INSERT, UPDATE, DELETE statements for a DataTable based on Select q....
Category: ADO.Net Date: 10/14/2010 11:17:47 AM
ADO.Net : How can you access children of XmlNode?

How can you access children of XmlNode?

By using Item[“node name”] property or ChildNodes collection
Category: ADO.Net Date: 10/14/2010 10:25:48 AM
ADO.Net : How do you check if connection to SQL server is open?

How do you check if connection to SQL server is open?

By using ConnectionState property
Category: ADO.Net Date: 10/14/2010 10:15:48 AM
ADO.Net : What is the purpose of DataContext objects?

What is the purpose of DataContext objects?

DataContext is entry point for the LINQ to SQL
Category: ADO.Net Date: 10/14/2010 8:30:47 AM