Check Point Software Most Frequently Asked ASP.NET Interview Questions Answers

Can You Allow Class To Be Inherited, But Prevent The Method From Being Over-ridden?

Yes,

just leave the class public and make the method sealed.

What Is An Abstract Class?

A class that cannot be instantiated. A concept in C++ known as pure virtual method. A class that must be inherited and have the methods over-ridden. Essentially, it is a blueprint for a class without any implementation.

When Do You Absolutely Have To Declare A Class As Abstract (as Opposed To Free-willed Educated Choice Or Decision Based On Uml Diagram)?

When at least one of the methods in the class is abstract. When the class itself is inherited from an abstract class, but not all base abstract methods have been over-ridden.

What Is An Interface Class?

It is an abstract class with public abstract methods all of which must be implemented in the inherited classes.

What Does Assert() Do?

In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.

What Is The Difference Between The Debug Class And Trace Class? Documentation Looks The Same?

Use Debug class for debug builds, use Trace class for both debug and release builds.

Why Are There Five Tracing Levels In System.diagnostics.traceswitcher?

The tracing dumps can be quite verbose and for some applications that are constantly running you run the risk of overloading the machine and the hard drive there. Five levels range from None to Verbose, allowing to fine-tune the tracing activities.

Where Is The Output Of Textwritertracelistener Redirected?

To the Console or a text file depending on the parameter passed to the constructor.

How Do You Debug An Asp.net Web Application?

Attach the aspnet_wp.exe process to the DbgClr debugger.
Check Point Software Most Frequently Asked ASP.NET Interview Questions Answers
Check Point Software Most Frequently Asked ASP.NET Interview Questions Answers

What Are Three Test Cases You Should Go Through In Unit Testing?

Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly).

Can You Change The Value Of A Variable While Debugging A C# Application?

Yes,

if you are debugging via Visual Studio.NET, just go to Immediate window.

Explain The Three Services Model (three-tier Application)?

Presentation (UI), business (logic and underlying code) and data (from storage or other sources).

What Are Advantages And Disadvantages Of Microsoft-provided Data Provider Classes In Ado.net?

SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix, but it is a .NET layer on top of OLE layer, so not the fastest thing in the world. ODBC.NET is a deprecated layer provided for backward compatibility to ODBC engines.

What Is The Role Of The Datareader Class In Ado.net Connections?

It returns a read-only dataset from the data source when the command is executed.

What Is The Wildcard Character In Sql? Let's Say You Want To Query Database With Like For All Employees Whose Name Starts With La.

The wildcard character is %, the proper query with LIKE would involve ‘La%’.

Explain Acid Rule Of Thumb For Transactions.

Transaction must be Atomic (it is one unit of work and does not dependent on previous and following transactions), Consistent (data is either committed or roll back, no “in-between” case where something has been updated and something hasn’t), Isolated (no transaction sees the intermediate results of the current transaction), Durable (the values persist if the data had been committed even if the system crashes right after).

What Connections Does Microsoft Sql Server Support?

Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server user name and passwords).

Which One Is Trusted And Which One Is Untrusted?

Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.

Why Would You Use Untrusted Verificaion?

Web Services might use it, as well as non-Windows applications.

What Does The Parameter Initial Catalog Define Inside Connection String?

The database name to connect to.

What Is The Data Provider Name To Connect To Access Database?

Microsoft.Access.

What Does Dispose Method Do With The Connection Object?

Deletes it from the memory.

What Is A Pre-requisite For Connection Pooling?

Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings.

What Is Ado.net?

ADO.NET is a part of the Microsoft .NET Framework. This framework provides the set of classes that deal with data communication between various layers of the software architecture and the database. It provides a continuous access to different data source types such as SQL Server versions 7, 2000, 2005. It also provides connectivity options to data sources through OLE DB and XML. Connectivity may be established with other databases like Oracle, MySQL etc. as well.

ADO.NET has the ability to separate data access mechanisms, data manipulation mechanisms and data connectivity mechanisms.

ADO.NET introduces along with it the disconnected architecture. In a disconnected architecture, data may be stored in a DataSet. It contains providers for connecting to databases, commands for execution and retrieval of results.

The classes for ADO.NET are stored in the DLL System.Data.dll.

Can We Connect Two Dataadapters To Same Data Source Using Single Connection At Same Time?

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; Multiple Active Result Sets=True";

Can We Do Database Operations Without Using Any Of The Ado.net Objects?

No,

its not at all possible.

If We Are Not Returning Any Records From The Database, Which Method Is To Be Used?

 There is a method called Execute Non Query. This method executes the Update, Delete etc. This does not return any rows but will give the number of rows affected.

How Can I Retrieve Two Tables Of Data At A Time By Using Data Reader?

If we execute 2 select command either in stored procedure or in select command and then executereader method fired of command object. it return 2 tables in datareader.

E.g
string str="Select * from a;select * from b";
cmd.commandtext=str;
dr=cmd.executereader();

Now it return 2 tables in datareader (dr).

Explain Executenonquery?

 Summary

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

Post a Comment

Previous Post Next Post