ADO.Net Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 823 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 xErgzS
Related Questions
ADO.Net : Can you edit XML data using XPathNavigator created from XMLDocument class?
ADO.Net : How do you use LINQ to SQL?

How do you use LINQ to SQL?

DataContext db = new DataContext(“connection string”); Table<Orders> Orders = db.GetTable<O....
Category: ADO.Net Date: 10/13/2010 2:34:47 PM
ADO.Net : What is strongly typed data context?

What is strongly typed data context?

Strongly typed data context declares all Table collections as members of the context so you don’t ne....
Category: ADO.Net Date: 10/13/2010 12:07:48 PM
ADO.Net : How do you load xml to Xelement object?

How do you load xml to Xelement object?

XElement root = XElement.Load(path to xml)
Category: ADO.Net Date: 10/13/2010 11:57:47 AM
ADO.Net : How do you protect your code against SqlInjection attacks?

How do you protect your code against SqlInjection attacks?

Use command parameters for sql query
Category: ADO.Net Date: 10/13/2010 11:57:47 AM