ADO.Net Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 792 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 wxgAEY
Related Questions
ADO.Net : How do you find what changes was done to the data set?

How do you find what changes was done to the data set?

By calling GetChanges() method
Category: ADO.Net Date: 10/14/2010 3:39:47 PM
ADO.Net : Is it possible to delete row using DataReader class?

Is it possible to delete row using DataReader class?

No
Category: ADO.Net Date: 10/14/2010 2:46:48 PM
ADO.Net : What is the difference between ExecuteNonQuery and BeginExecuteNonQuery?

What is the difference between ExecuteNonQuery and BeginExecuteNonQuery?

Execute non query block the program till the query will be processed and result returned. BeginExecu....
Category: ADO.Net Date: 10/14/2010 1:54:47 PM
ADO.Net : How do you create dataset object and populate it with data from c# code?

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

DataSet ds = new DataSet(); ds.Tables.Add(new DataTable()); ds.Tables[0].Columns.Add(“col1”); ds.Tab....
Category: ADO.Net Date: 10/14/2010 1:54:47 PM
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