Data Provider provides objects through which functionalities like opening and closing connection, retrieving and updating data can be availed.It also provides access to data source like SQL Server, Access, and Oracle.
Some of the data provider objects are
Command object which is used to store procedures.
Data Adapter which is a bridge between datastore and dataset.
Datareader which reads data from data store in forward only mode.
A dataset object is not in directly connected to any data store. It represents disconnected and cached data.
The dataset communicates with Data adapter that fills up the dataset. Dataset can have one or more Datatable and relations.
.net Framework?
This includes introduction of .Net framework, .Net framework architecture, role of assembly and GAC.
Asp.net 2.0 Web Parts Framework?
ASP.NET 2.0 ships with a Web Parts Framework that provides the infrastructure and the building blocks required for creating modular web pages that can be easily customized by the users. You can use Web Parts to create portal pages that aggregate different types of content, such as static text, links, and content that can change at runtime.
.net Assembly?
This article explains .Net assembly, private and shared assembly, satellite assemblies, resource-only assembly, ResourceManager class, strong name, global assembly cache.
ServiceNow Most Frequently Asked Latest ASP.NET Interview Questions Answers |
Model View Controller?
we will learn about MVC design patterns, and how Microsoft has made our lives easier by creating the ASP.NET MVC framework for easier adoption of MVC patterns in our web applications.
Differences Between "dataset"and "datareader"?
DataSet object can contain multiple rowsets from the same data source as well as from the relationships between them.
What Is Microsoft Ado.net?
Visual Studio .NET provides access to databases through the set of tools and namespaces collectively referred to as Microsoft ADO.NET.
What Are The 3 Major Types Of Connection Objects In Ado.net?
OleDbConnection object : Use an OleDbConnection object to connect to a Microsoft Access or third-party database, such as MySQL. OLE database connections use the OleDbDataAdapter object to perform commands and return data.
SqlConnection object : Use a SqlConnection object to connect to a Microsoft SQL Server database. SQL database connections use the SqlDataAdapter object to perform commands and return data.
OracleConnection object : Use an OracleConnection object to connect to Oracle databases. Oracle database connections use the OracleDataAdapter object to perform commands and return data. This connection object was introduced in Microsoft .NET Framework version 1.1.
List The 4 Common Ado.net Namespaces?
System.Data : Contains Classes, types, and services for creating and accessing data sets and their subordinate objects.
System.Data.SqlClient : Contains Classes and types for accessing Microsoft SQL Server databases.
System.Data.OracleClient : Contains Classes and types for accessing Oracle databases (Microsoft .NET Framework version 1.1 and later).
System.Data.OleDb : Contains Classes and types for accessing other databases.
List All The Steps In Order, To Access A Database Through Ado.net?
Create a connection to the database using a connection object.
Invoke a command to create a DataSet object using an adapter object.
Use the DataSet object in code to display data or to change items in the database.
Invoke a command to update the database from the DataSet object using an adapter object.
Close the database connection if you explicitly opened it in step 2 using the Open method. Invoking commands without first invoking the Open method implicitly opens and closes the connection with each request.
Why Will You Usually Create An Aspnet User Account In The Database For An Asp.net Web Application?
Web applications run using the ASPNET user account. The SQL database administrator will have to set up this account and grant it permissions before your Web application will have access to a SQL database. For file-based databases, such as Microsoft Access, you must grant permissions on the database file to the ASPNET user account using Windows file security settings.
What Is The Difference Between Datareader And Dataadapter?
Data Reader is read only forward only and much faster than DataAdapter.
If you use DataReader you have to open and close connection explicitly where as if you use DataAdapter the connection is automatically opened and closed.
DataReader is connection oriented where as Data Adapter is disconnected.
Why Edit Is Not Possible In Repeater?
It has no such feature.
Difference Between Sqlcommand And Sqlcommandbuilder?
SQLCommand is used to execute all kind of SQL queries like DML(Insert, update,Delete) & DDL like(Create table, drop table etc),
SQLCommandBuilder object is used to build & execute SQL (DML) queries like select, insert, update & delete.
Why Cannot We Use Multiple Inheritance And Garbage Collector Paralelly In .net?
.Net doesn't support the mutiple inheritance, perhaps you may talk about multi-level inheritance.
In the later case, if a class is inherited from another class, at the time of creating instance, it will obviously give a call to its base class constructor (ie bottom - top approach). Like wise the constructor execution is takes place in top down approach (ie. base class constructor is executed and the derived class constructor is executed).
So for GC, it will collect only when an object does not have any reference. As we see previously, the derived is constructed based on base class. There is a reference is set to be. Obviously GC cannot be collected.
How To Find The Given Query Is Optimised One Or Not?
First Execute Sql Queries in Query Analzer,see How much time it take to Execute , if it is Less then the your desired Time, then it will Optimize query.
How To Copy The Contents From One Table To Another Table And How To Delete The Source Table In Ado.net?
DataSet ds;
sqlAdap.Fill(ds);
Datatable dt = ds.Tables[0].copy();
//now the structure and data are copied into 'dt'
ds.Tables.remove(ds.Table[0]);
//now the source is removed from the 'ds'
How To Call The Sql Commands Asynchronously In Ado.net Version 2.0?
executescalar()
executereader()
executenonquery()
These comes with Begin and End like Beginexecutescalr() Endexecutescalar()....... by using these command we can achieve asynchronous command in ado.net.
What Is Typed And Untyped Dataset?
A DataSet can be Typed or Untyped. The difference between the two lies in the fact that a Typed DataSet has a schema and an Untyped DataSet does not have one. It should be noted that the Typed Datasets have more support in Visual studio.
I Loaded The Dataset With A Table Of 10 Records. One Of The Records Is Deleted From The Backend, How Do You Check Whether All The 10 Records Were Present While Updating The Data(which Event And Steps) And Throw The Exception.
By Using the Transactions we can check the Exact Numbers of the rows to be updated and if the updation fails then the Transaction will be rollbacked.
Can Datareader Hold Data From Multiple Tables?
data reader can hold data from multiple tables and datareader can hold more than one table.
string query="select * from employee; select * from student";
sqlcommand cmd=new sqlcommand(query, connection);
sqldatareader dr=cmd.executeReader();
if(dr.hasrows)
{
dr.read();
gridview1.DataSource=dr;
gridview1.Databind();
if(dr.nextresult)
{
gridview2.datasource=dr;
gridview2.databind();
}
}
dr.colse();
connection.close();
What Is Different Between Sqlcommand Object And Command Behavior Object?
ADO.NET Command Object - The Command object is similar to the old ADO command object.
It is used to store SQL statements that need to be executed against a data source.
The Command object can execute SELECT statements, INSERT, UPDATE, or DELETE statements, stored procedures, or any other statement understood by the database.
What Is Bubbled Event Can You Explain?
All heavy controls like grid view, datagrid or datalist, repeater controls cantains the child controls like button or link button, when we click this button then the event will be raised, that events are handled by parent controls, that is called event bubbling, means event is bubbled from bottom (child) to up (parent).
If A Table Contains 20000 Records. In A Page At Each Time 100 Records To Be Displayed. What Are The Steps You Will Take To Improve Performance? Will You Use Dataset Or Datareader?
we have to use a dataset because on using datareader forward only paging can be achieved. Suppose if you are at 1000 page and you want to go back to 999th page, if you use datareader it cannot be achieved, since it does not support backward navigation. Dataset supports forward and backward navigation.
What Are The Different Row Versions Available In Table?
There are four types of Rowversions.
Current
The current values for the row. This row version does not exist for rows with a RowState of Deleted.
Default
The row the default version for the current DataRowState. For a DataRowState value of Added, Modified or Current, the default version is Current. For a DataRowState of Deleted, the version is Original. For a DataRowState value of Detached, the version is Proposed.
Original
The row contains its original values.
Proposed
The proposed values for the row. This row version exists during an edit operation on a row, or for a row that is not part of a DataRowCollection.
What Are The Two Fundamental Objects In Ado.net?
Datareader and Dataset are the two fundamental objects in ADO.NET.
What We Do With The Object Of Ado.net Dataset After Using It?can We Dispose It Or Can We Set It Nothing?is It Must Or Not?
we use dispose.
What Provider Ado.net Use By Default?
Ado.net uses no Dataprovider by default.
What Is The Provider And Namespaces Being Used To Access Oracle Database?
The provider name is oledb and the namespace is system.data.oledb
Explain Acid Properties?
The term ACID conveys the role transactions play in mission-critical applications. Coined by transaction processing pioneers, ACID stands for atomicity, consistency, isolation, and durability.
These properties ensure predictable behavior, reinforcing the role of transactions as all-or-none propositions designed to reduce the management load when there are many variables.
What Is Atomicity?
A transaction is a unit of work in which a series of operations occur between the BEGIN TRANSACTION and END TRANSACTION statements of an application. A transaction executes exactly once and is atomic ?
all the work is done or none of it is.
Operations associated with a transaction usually share a common intent and are interdependent.
By performing only a subset of these operations, the system could compromise the overall intent of the transaction. Atomicity eliminates the chance of processing a subset of operations.
What Is Isolation?
A transaction is a unit of isolation ? allowing concurrent transactions to behave as though each were the only transaction running in the system.
Isolation requires that each transaction appear to be the only transaction manipulating the data store, even though other transactions may be running at the same time. A transaction should never see the intermediate stages of another transaction.
Transactions attain the highest level of isolation when they are serializable. At this level, the results obtained from a set of concurrent transactions are identical to the results obtained by running each transaction serially.
Because a high degree of isolation can limit the number of concurrent transactions, some applications reduce the isolation level in exchange for better throughput.
What Is Data Adapter?
Data adapter is bridge between Connection and DataSet , Data adapter in passing the sql query and fill in dataset.
Can You Inherit From Sqlconnection Class?
No,
you cannot inheirt from SqlConnection Class. SqlConnection Class is a sealed class. It is a compile time error.
Will The Connection Be Closed, If The Sqlconnection Object Goes Out Of Scope?
No,
If the SqlConnection goes out of scope, it won't be closed. Therefore, you must explicitly close the connection by calling Close or Dispose.
Post a Comment