How to Filling the DataSet in Disconnected mode in ADO.Net?

How to Filling the DataSet in Disconnected mode in ADO.Net?

Once you have a DataSet and SqlDataAdapter instances, you need to fill the DataSet.  Here's how to do it, by using the Fill method of the SqlDataAdapter:
SqlDataAdapter daStudent = new SqlDataAdapter
       ("select StudentID, CollegeName from Students", conn);
SqlCommandBuilder cmdBldr = new SqlCommandBuilder(daStudent);
daStudent.Fill(dsStudent, "Students"); 
Fill method, takes two parameters: a DataSet and a table name.

By:Aditya
Date:2028-10-10 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related ADO.NET Subjective Links

ADO.NET Subjective interview questions and answers for experienced and fresher