Site icon Job Portal

Ado.Net interview questions and answers for 3 years of experience

Ado.net Interview questions and answer

Ado.net Interview questions and answer

What is Ado.Net ?

More searching about interviews questions and answers click these links Asp.net, C#, and .Net Design Pattern

The data access classes for the Net framework
•Designed for highly-efficient data access
•Support for XML and disconnected record sets

Where does Ado.Net set ?

What is .Net Data Provider ?

What is Data Provider Functionality?

What is Ado.Net objects ?

Sqlconnection Object :

To interact with a database, we must have a connection to it.
The connection helps identify the database server, the database name, user name, password, and other parameters that are required for connecting to the database.
A connection object is used by command objects.

SqlCommand Objet :

Actions are specified by command objects
Command objects send SQL statements to the database
Uses a connection object to figure out which database to communicate with

SqlDataReader Object SqlDataReaderObject :

Stream of data for reading records
The data reader object allows us to
obtain the results of a SELECT statement om a command object statement from a command object.
Data reader is a fast forward-only stream of data
This means that you can only pull the data from the stream in a sequential manner.

Dataset Object:

The in-memory representation of data Contains multiple DataTableobjects, which contain columns and rows, just
like no mal database tables like normal database tables. Specifically designed to help manage
data in memory and to support data in memory and to support disconnected operations on data.

DataSetis an object that is used by all of the Data Providers
which is why not have a Data Provider-specific prefix

SqlDataAdapter Object:

When we require read-only access or rarely make changes to the data.
And want to minimize the database calls and caching of data calls and caching of data
We use SqlDataAdapter that helps us in managing the data in disconnected in managing the data in disconnected
mode.
Fills in a DataSetwhile reading the data and writes back in a single
batch while writing back to the database.

Contains a reference to the connection and opens and closes it automatically
Additionally the data adapter •Additionally, the data adapter contains command object references
for SELECT, INSERT, UPDATE, and DELETE operations on the data.

Ado.Net Object Model

SQL Namespaces Objects:

using System.Data.SqlClient;
• SqlConnection
• SqlCommand
• SqlDataReader
• SqlDataAdapter

• SqlParameter
• SqlParameterCollection
• SqlError
• SqlErrorCollection
• SqlException
• SqlTransaction
• SqlDbType

Connection to SQL:

usingSystem.Data.SqlClient;
string sConnectionString =“Initial Catalog=yourdatabasename; Initial Catalog=yoursystemname;Data Source=localhost;
Integrated Security=SSPI;”

SqlDataAdapter sqlAdp= new
SqlDataAdapter(sConnectionString);
sqlAdp.Close();
sqlAdp Dispose(); sqlAdp.Dispose();

Getting Data:

SqlCommand
ExecuteReader
ExecuteNonQuery
ExecuteScalar
ExecuteXMLReader SqlDataAdapter
DataSet

Dataset, DataTablesand Rows:

What is SQL-Transactions?

A transaction is a unit of work that is performed against a database. Transactions are units or sequences of work accomplished in a logical order, whether in a manual fashion by a user or automatically by some sort of database program.

Properties of Transactions:

Transaction Control:

There are the following commands used to control transactions:

More searching about interviews questions and answers click these links Asp.net, C#, and .Net Design Pattern

More related topic website links are given below

Top 50 ADO.Net Interview Questions & Answers (2022 Update)

ADO.NET Interview Questions And Answers – C# Corner

25+ Most Popular ADO.NET Interview Questions and Answers

More Popular ADO.NET |Top ADO.NET Interview Questions|Ado.Net C#|Ado.net tutorial

Exit mobile version