ADO.Net Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 565 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 dQGsRh
Related Questions
ADO.Net : How can you call stored procedure from c# code?

How can you call stored procedure from c# code?

By calling it using SqlCommand object
Category: ADO.Net Date: 10/14/2010 6:15:47 PM
ADO.Net : Does ADO.NET supports paging through a query result?

Does ADO.NET supports paging through a query result?

Yes, DataAdapter.Fill method has option to page results
Category: ADO.Net Date: 10/14/2010 5:33:48 PM
ADO.Net : Can DataReader move backward?

Can DataReader move backward?

No, it’s forward-only
Category: ADO.Net Date: 10/14/2010 5:33:48 PM
ADO.Net : What does the DataContext class do?

What does the DataContext class do?

It’s main entry point for the LINQ to SQL framework
Category: ADO.Net Date: 10/14/2010 3:48:48 PM
ADO.Net : How do you get constraints for a given data table?

How do you get constraints for a given data table?

dataTable.Constraints
Category: ADO.Net Date: 10/14/2010 3:39:47 PM