ADO.Net Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 871 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 EMeCY5
Related Questions
ADO.Net : What classes can you use to process XML data in memory?

What classes can you use to process XML data in memory?

XmlDocument, XPathDocument, XPathNavigator and LINQ to XML
Category: ADO.Net Date: 10/15/2010 4:21:48 AM
ADO.Net : How do you set up the connection timeout for SqlConnection object?

How do you set up the connection timeout for SqlConnection object?

By using ConnectionTimeout property
Category: ADO.Net Date: 10/15/2010 4:11:48 AM
ADO.Net : How do you handle binary large objects in DataReader?

How do you handle binary large objects in DataReader?

Binary large objects are stored in dataset as array of bytes
Category: ADO.Net Date: 10/15/2010 1:24:47 AM
ADO.Net : Can data set load data directly from xml?

Can data set load data directly from xml?

yes, by using ReadXml method
Category: ADO.Net Date: 10/14/2010 11:49:47 PM
ADO.Net : What does the ExecuteScalar() method?

What does the ExecuteScalar() method?

ExecuteScalar returns first column of first row from result set.
Category: ADO.Net Date: 10/14/2010 11:39:47 PM