.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Sharon Maxwell


Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.


Post New Question Subscribe to Interview Questions
 
Quick Links For Interview Questions Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  OOPs  JQuery  JavaScript/VBScript
BiztalkPatten/PracticesIISWCFWPFWWF
NetworkingAptitudeOthers  All    
 

ADO.Net Interview Questions and Answers

Explain ExecuteNonQuery?

Author: Subhransu Sekhar Jena          Posted Date: October 31, 2014    Category: ADO.Net     Points: 40

// Summary:

// Executes a Transact-SQL statement against the connection and returns the number of rows affected.

// Returns:

// The number of rows affected.

can we connect two dataadapters to same data source using single connection at same time?

Author: Subhransu Sekhar Jena          Posted Date: October 31, 2014    Category: ADO.Net     Points: 40

yes,we can connect two dataadapters to same datasource using single connection at same time.
There is a technology in ado.net 2.0 called MARS usinng Mars in connection string we can do it.
for eg:
cn.ConnectionString = "server=(local); database=employee; integrated security=sspi; MultipleActiveResultSets=True";

What are the steps involved to fill a dataset?

Author: Subhransu Sekhar Jena          Posted Date: October 31, 2014    Category: ADO.Net     Points: 40

Dataset dsIndia=new Dataset();
DataAdapter daIndia=new DataAdapter ();
daIndia.Fill(dsIndia);

Which is the best place to store connection string in .NET projects?

Author: Subhransu Sekhar Jena          Posted Date: October 31, 2014    Category: ADO.Net     Points: 40

Global.asa or Resource file of the project

Explain in detail the fundamental of connection pooling?

Author: Subhransu Sekhar Jena          Posted Date: October 31, 2014    Category: ADO.Net     Points: 40

ADO.NET with IIS uses a technique called connection pooling, which is very helpful in applications which regularly connecting to the database and accessing information on the server. In this if the database call is made for the first time the connection object is made, after release of connection that object is kept in pool and ADO.NET keeps reference to it. And next time when the request to execute any query/stored proc comes up, it bypasses the hefty process of establishing the connection and just picks up the connection from the connection pool and uses that for this database call.

What are basic methods of Data adapter?

Author: Subhransu Sekhar Jena          Posted Date: October 31, 2014    Category: ADO.Net     Points: 40

Fill :- Executes the SelectCommand to fill the DataSet object with data from the data source. It an also be used to update (refresh) an existing table in a DataSet with changes made to the data in the original datasource if there is a primary key in the table in the DataSet.
FillSchema :- Uses the SelectCommand to extract just the schema for a table from the data source, and creates an empty table in the DataSet object with all the corresponding constraints.
Update:- Calls the respective InsertCommand, UpdateCommand, or DeleteCommand for each inserted, updated,or deleted row in the DataSet so as to update the original data source with the changes made to the content of the DataSet. This is a little like the UpdateBatch method provided by the ADO Recordset object, but in the DataSet it can be used to update more than one table.

What is the use of connection object?

Author: Subhransu Sekhar Jena          Posted Date: October 31, 2014    Category: ADO.Net     Points: 40

It is used to create conection with the Database.

Which architecture does Datasets follow?

Author: Subhransu Sekhar Jena          Posted Date: September 29, 2014    Category: ADO.Net     Points: 40

Disconnected data architecture.

What are different layers of ADO.Net?

Author: Subhransu Sekhar Jena          Posted Date: September 29, 2014    Category: ADO.Net     Points: 40

Presentation Layer
Business Logic Layer
Database Access Layer

What is the namespace that is used to include .NET Data Provider for SQL server in .NET code.

Author: Subhransu Sekhar Jena          Posted Date: September 29, 2014    Category: ADO.Net     Points: 40

System.Data.SqlClient
« Previous1234567891011Next »



Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend