Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     

ADO.NET interview questions: - What are basic methods of Data adapter and mention the use of data adapter?

There are three most commonly used methods of Data adapter: -

Fill: - Executes the Select Command to fill the Dataset object with data from the data source. It can also be used to update (refresh) an existing table in a Dataset with changes made to the data in the original data source if there is a primary key in the table in the Dataset.

Fill Schema: - Extracts just the schema for a table from the data source, and creates an empty table in the DataSet object with all the correspondingconstraints.

Use of data adapter 

Data adapter object acts like a bridge it helps to load the dataset object. Below is a simple code snippet which shows how the dataadapter object is created and then using the fill method the dataset object is loaded.

SqlDataAdapter objAdapter = new SqlDataAdapter(objCommand);

DataSet objDataset = new DataSet();


Above is the ADO.NET interview questions and see following video on dataset is a connected while datareader is disconnected: -

Helpful Website Url
Share this article   |    Print    |    Article read by 4757 times
Shivprasad koirala Koirala
I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small E-learning company in India. We are very much active in making training videos , writing books and corporate trainings. Do visit my site for .NET, C# , design pattern , WCF , Silverlight , LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server training and Interview questions and answers
Related Articles:
Related Interview Questions: