Interview Q&A

Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.

4616 total questions 4516 technical 100 career & HR 4346 from PDF library

Showing 51–75 of 117

Career & HR topics

By tech stack

Junior PDF
What is the purpose of Command object in ADO.NET?

The Command object is used to execute SQL queries or stored procedures against a database. It encapsulates the SQL statement or stored procedure and returns results. Example: SqlCommand command = new SqlCommand("SELECT *…

ADO.NET Read answer
Junior PDF
What is the difference between ExecuteNonQuery, ExecuteReader, and ExecuteScalar?

Follow: ExecuteNonQuery: Executes SQL commands that do not return data (e.g., INSERT, UPDATE, DELETE). Example: command.ExecuteNonQuery(); (used to insert a record). ExecuteReader: Executes SQL commands that return rows…

ADO.NET Read answer
Junior PDF
What is the role of the ConnectionString?

The ConnectionString contains information required to connect to the database, such as the database server, database name, credentials, and other configurations. Example: string connectionString = "Data Source=server_nam…

ADO.NET Read answer
Junior PDF
What is the difference between SQLConnection and OLEDBConnection?

SqlConnection: Used specifically for connecting to SQL Server databases. OleDbConnection: A more general connection class that can connect to a variety of data sources, such as MS Access, Excel, Oracle, etc. Example: Use…

ADO.NET Read answer
Junior PDF
What is the difference between an SQLCommand and a Stored Procedure?

SQLCommand: A SQL command is a string of SQL code (like SELECT, INSERT, etc.) that is executed directly against the database. Stored Procedure: A precompiled collection of SQL statements that can be executed as a unit. I…

ADO.NET Read answer
Junior PDF
What is Connection Pooling in ADO.NET?

Connection Pooling allows multiple applications or threads to reuse existing database connections instead of opening a new connection each time. It improves performance by reducing the overhead of opening and closing con…

ADO.NET Read answer
Mid PDF
What are the advantages of using ADO.NET over traditional ADO?

Disconnected model: ADO.NET uses a disconnected model (DataSet/DataTable), which allows applications to work offline, reducing the load on the database. Better performance: ADO.NET allows better resource management and c…

ADO.NET Read answer
Mid PDF
Explain the difference between DataSet and DataReader with

examples. DataSet: Works in a disconnected mode and holds multiple tables and relationships. You can navigate and manipulate the data offline. Example: Use a DataSet to hold customer and order data for offline processing…

ADO.NET Read answer
Junior PDF
What is the purpose of CommandTimeout property in ADO.NET?

The CommandTimeout property specifies the amount of time (in seconds) before a command is considered to have timed out. If the command execution takes longer than the specified time, an error is raised. Example: SqlComma…

ADO.NET Read answer
Junior PDF
What is the role of the SqlDataAdapter?

Answer: The SqlDataAdapter serves as a bridge between a DataSet (or DataTable) and the database. It is responsible for: What interviewers expect A clear definition tied to ADO.NET in ADO.NET projects Trade-offs (performa…

ADO.NET Read answer
Mid PDF
How do you update the database using DataSet in ADO.NET?

To update the database using a DataSet: What interviewers expect A clear definition tied to ADO.NET in ADO.NET projects Trade-offs (performance, maintainability, security, cost) When you would and would not use it in pro…

ADO.NET Read answer
Junior PDF
What is the significance of the SqlDataReader? The SqlDataReader is used to retrieve data from the database in a forward-only and read-only manner. It is more efficient than a DataSet when you need to retrieve a large

mount of data quickly and do not need to modify the data. It requires an open connection to the database and reads data sequentially, one row at a time. Example: SqlCommand command = new SqlCommand("SELECT CustomerName F…

ADO.NET Read answer
Junior PDF
What is the significance of the SqlDataReader?

The SqlDataReader is used to retrieve data from the database in a forward-only and read-only manner. It is more efficient than a DataSet when you need to retrieve a large amount of data quickly and do not need to modify…

ADO.NET Read answer
Junior PDF
Explain the use of the Fill method of the DataAdapter. The Fill() method of the DataAdapter is used to populate a DataSet or DataTable with data from the database. It executes the SELECT query defined in the DataAdapter and fills the specified DataSet or DataTable with the results. Example: SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM Customers", connection); DataSet dataset = new DataSet();

Answer: dapter.Fill(dataset, "Customers"); // Fills the DataSet with data from the "Customers" table What interviewers expect A clear definition tied to ADO.NET in ADO.NET projects Trade-offs (performance, maintainabilit…

ADO.NET Read answer
Mid PDF
Explain the use of the Fill method of the DataAdapter.?

The Fill() method of the DataAdapter is used to populate a DataSet or DataTable with data from the database. It executes the SELECT query defined in the DataAdapter and fills the specified DataSet or DataTable with the r…

ADO.NET Read answer
Mid PDF
How can you manage database connections in ADO.NET?

Answer: In ADO.NET, database connections are managed using the Connection object, such as SqlConnection for SQL Server. The process involves: What interviewers expect A clear definition tied to ADO.NET in ADO.NET project…

ADO.NET Read answer
Mid PDF
How do you execute a stored procedure using ADO.NET?

To execute a stored procedure using ADO.NET: What interviewers expect A clear definition tied to ADO.NET in ADO.NET projects Trade-offs (performance, maintainability, security, cost) When you would and would not use it i…

ADO.NET Read answer
Junior PDF
What is the difference between a DataSet and a DataTable in terms of data handling?

DataSet is a collection of DataTable objects, and it can hold multiple tables and relationships between them. It is used for handling disconnected data and can work offline, and it can also support complex structures, su…

ADO.NET Read answer
Mid PDF
Explain the process of binding a DataTable to a GridView in ASP.NET.

To bind a DataTable to a GridView in ASP.NET: What interviewers expect A clear definition tied to ADO.NET in ADO.NET projects Trade-offs (performance, maintainability, security, cost) When you would and would not use it…

ADO.NET Read answer
Mid PDF
How do you handle exceptions in ADO.NET?

DO.NET exceptions are typically handled using try-catch blocks. This helps to capture any errors during database operations such as connection failures, query issues, or command execution errors. Example: try { SqlConnec…

ADO.NET Read answer
Junior PDF
What is the role of the SqlConnection object in ADO.NET?

The SqlConnection object is responsible for opening a connection to a SQL Server database. It represents the physical connection to the data source and must be open before executing commands (like SqlCommand) or reading…

ADO.NET Read answer
Junior PDF
What is the difference between a strongly typed and a loosely typed DataSet?

Strongly Typed DataSet: A DataSet that is generated from an XSD (XML Schema Definition) file, which defines the structure of the data (tables, columns, relationships). It provides type safety and compile-time checking. L…

ADO.NET Read answer
Junior PDF
What is a transaction in ADO.NET, and how do you manage it?

Answer: transaction in ADO.NET is a sequence of database operations that are executed as a single unit. If one operation fails, all previous operations are rolled back. You can manage transactions using the SqlTransactio…

ADO.NET Read answer
Mid PDF
How do you implement multiple transactions in ADO.NET?

You can execute multiple transactions sequentially by managing multiple SqlTransaction objects. Each transaction can either be committed or rolled back based on the success or failure of the operations. Example: SqlConne…

ADO.NET Read answer
Mid PDF
What are the different types of Command objects in ADO.NET?

Answer: In ADO.NET, the Command object is used to execute SQL queries or stored procedures. The main types of Command objects are: What interviewers expect A clear definition tied to ADO.NET in ADO.NET projects Trade-off…

ADO.NET Read answer

ADO.NET ADO.NET Core Tutorial · ADO.NET

The Command object is used to execute SQL queries or stored procedures against a

database. It encapsulates the SQL statement or stored procedure and returns results.

Example:

SqlCommand command = new SqlCommand("SELECT * FROM Customers",

connection);

SqlDataReader reader = command.ExecuteReader();
Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

Follow:

  • ExecuteNonQuery: Executes SQL commands that do not return data (e.g., INSERT,

UPDATE, DELETE).

  • Example: command.ExecuteNonQuery(); (used to insert a record).
  • ExecuteReader: Executes SQL commands that return rows (e.g., SELECT queries).

It returns a DataReader.

  • Example: command.ExecuteReader(); (used to select records).
  • ExecuteScalar: Executes SQL commands and returns a single value (e.g., a single

cell of data).

  • Example: command.ExecuteScalar(); (used for retrieving the count or

aggregate values).

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

The ConnectionString contains information required to connect to the database, such as

the database server, database name, credentials, and other configurations.

Example:

string connectionString = "Data Source=server_name;Initial
Catalog=database_name;User ID=user_name;Password=password;";
Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

  • SqlConnection: Used specifically for connecting to SQL Server databases.
  • OleDbConnection: A more general connection class that can connect to a variety of

data sources, such as MS Access, Excel, Oracle, etc.

Example:

Use SqlConnection for SQL Server:

SqlConnection sqlConnection = new SqlConnection(connectionString);
  • Use OleDbConnection for Access or other databases:

OleDbConnection oleDbConnection = new

OleDbConnection(connectionString);

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

  • SQLCommand: A SQL command is a string of SQL code (like SELECT, INSERT,

etc.) that is executed directly against the database.

  • Stored Procedure: A precompiled collection of SQL statements that can be

executed as a unit. It can contain more complex logic, including control-of-flow and

error handling.

Example:

  • SQL Command: SELECT * FROM Customers;
  • Stored Procedure: EXEC GetCustomerDetails;
Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

Connection Pooling allows multiple applications or threads to reuse existing database

connections instead of opening a new connection each time. It improves performance by

reducing the overhead of opening and closing connections repeatedly.

Example: When using SQL Server, the connection pool automatically manages the reuse of

connections.

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

  • Disconnected model: ADO.NET uses a disconnected model (DataSet/DataTable),

which allows applications to work offline, reducing the load on the database.

  • Better performance: ADO.NET allows better resource management and can handle

large data volumes efficiently.

  • XML support: ADO.NET has built-in support for XML, making it easier to work with

XML data.

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

examples.

  • DataSet: Works in a disconnected mode and holds multiple tables and relationships.

You can navigate and manipulate the data offline.

  • Example: Use a DataSet to hold customer and order data for offline

processing.

  • DataReader: A forward-only, read-only cursor that requires an open connection to

the database. It is faster for reading large amounts of data in a streaming manner.

  • Example: Use DataReader when fetching records to display in a report or grid

in a single-pass, forward-only manner.

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

The CommandTimeout property specifies the amount of time (in seconds) before a

command is considered to have timed out. If the command execution takes longer than the

specified time, an error is raised.

Example:

SqlCommand command = new SqlCommand("SELECT * FROM Customers",

connection);

command.CommandTimeout = 30; // Timeout after 30 seconds
Intermediate ADO.NET Questions
Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

Answer: The SqlDataAdapter serves as a bridge between a DataSet (or DataTable) and the database. It is responsible for:

What interviewers expect

  • A clear definition tied to ADO.NET in ADO.NET projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ADO.NET application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ADO.NET architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

To update the database using a DataSet:

What interviewers expect

  • A clear definition tied to ADO.NET in ADO.NET projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ADO.NET application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ADO.NET architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

mount of data quickly and do not need to modify the data. It requires an open connection to

the database and reads data sequentially, one row at a time.

Example:

SqlCommand command = new SqlCommand("SELECT CustomerName FROM

Customers", connection);

SqlDataReader reader = command.ExecuteReader();

while (reader.Read())

{

Console.WriteLine(reader["CustomerName"]);

}

reader.Close();

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

The SqlDataReader is used to retrieve data from the database in a forward-only and

read-only manner. It is more efficient than a DataSet when you need to retrieve a large

amount of data quickly and do not need to modify the data. It requires an open connection to

the database and reads data sequentially, one row at a time.

Example:

SqlCommand command = new SqlCommand("SELECT CustomerName FROM

Customers", connection);

SqlDataReader reader = command.ExecuteReader();

while (reader.Read())

Console.WriteLine(reader["CustomerName"]);

reader.Close();

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

Answer: dapter.Fill(dataset, "Customers"); // Fills the DataSet with data from the "Customers" table

What interviewers expect

  • A clear definition tied to ADO.NET in ADO.NET projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ADO.NET application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ADO.NET architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

The Fill() method of the DataAdapter is used to populate a DataSet or DataTable with data

from the database. It executes the SELECT query defined in the DataAdapter and fills the

specified DataSet or DataTable with the results.

Example:

SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM

Customers", connection);

DataSet dataset = new DataSet();

Follow:

adapter.Fill(dataset, "Customers"); // Fills the DataSet with data

from the "Customers" table

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

Answer: In ADO.NET, database connections are managed using the Connection object, such as SqlConnection for SQL Server. The process involves:

What interviewers expect

  • A clear definition tied to ADO.NET in ADO.NET projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ADO.NET application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ADO.NET architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

To execute a stored procedure using ADO.NET:

What interviewers expect

  • A clear definition tied to ADO.NET in ADO.NET projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ADO.NET application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ADO.NET architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

  • DataSet is a collection of DataTable objects, and it can hold multiple tables and

relationships between them. It is used for handling disconnected data and can work

offline, and it can also support complex structures, such as parent-child relationships.

  • DataTable represents a single table in-memory and contains rows and columns. It

can be used for simpler scenarios where only one table of data is needed.

Example:

  • DataSet: Holds multiple tables, such as Customers and Orders.
  • DataTable: Holds data from a single table like Customers.
Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

To bind a DataTable to a GridView in ASP.NET:

What interviewers expect

  • A clear definition tied to ADO.NET in ADO.NET projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ADO.NET application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ADO.NET architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

DO.NET exceptions are typically handled using try-catch blocks. This helps to capture any

errors during database operations such as connection failures, query issues, or command

execution errors.

Example:

try

{
SqlConnection connection = new SqlConnection(connectionString);

connection.Open();

SqlCommand command = new SqlCommand("SELECT * FROM Customers",

connection);

SqlDataReader reader = command.ExecuteReader();
}

catch (SqlException ex)

{

Console.WriteLine("Database error: " + ex.Message);

}

catch (Exception ex)

{

Console.WriteLine("General error: " + ex.Message);

}
Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

The SqlConnection object is responsible for opening a connection to a SQL Server

database. It represents the physical connection to the data source and must be open before

executing commands (like SqlCommand) or reading data (using SqlDataReader or

SqlDataAdapter).

Example:

SqlConnection connection = new SqlConnection(connectionString);

connection.Open();

// Execute database commands

connection.Close();

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

  • Strongly Typed DataSet: A DataSet that is generated from an XSD (XML Schema

Definition) file, which defines the structure of the data (tables, columns,

relationships). It provides type safety and compile-time checking.

  • Loosely Typed DataSet: A DataSet that does not have predefined schemas,

meaning you access tables and columns by name at runtime. This offers flexibility but

no compile-time checking.

Example:

  • Strongly Typed: You get intellisense and type safety when accessing columns.
  • Loosely Typed: You need to access tables and columns by name as strings, without
intellisense.
Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

Answer: transaction in ADO.NET is a sequence of database operations that are executed as a single unit. If one operation fails, all previous operations are rolled back. You can manage transactions using the SqlTransaction object. Steps:

What interviewers expect

  • A clear definition tied to ADO.NET in ADO.NET projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ADO.NET application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ADO.NET architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

You can execute multiple transactions sequentially by managing multiple SqlTransaction

objects. Each transaction can either be committed or rolled back based on the success or

failure of the operations.

Example:

SqlConnection connection = new SqlConnection(connectionString);

connection.Open();

SqlTransaction transaction1 = connection.BeginTransaction();

SqlTransaction transaction2 = connection.BeginTransaction();

Follow:

try

// First transaction

SqlCommand command1 = new SqlCommand("UPDATE Customers SET

Balance = Balance - 100", connection, transaction1);

command1.ExecuteNonQuery();

transaction1.Commit();

Advanced ADO.NET Questions

Permalink & share

ADO.NET ADO.NET Core Tutorial · ADO.NET

Answer: In ADO.NET, the Command object is used to execute SQL queries or stored procedures. The main types of Command objects are:

What interviewers expect

  • A clear definition tied to ADO.NET in ADO.NET projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ADO.NET application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ADO.NET architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details