Interview Q&A

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

4608 total questions 4508 technical 100 career & HR 4272 from PDF library

Showing 76–100 of 963

Career & HR topics

By tech stack

Popular tracks

Junior PDF
What is the difference between SQLConnection and OLEDBConnection?

Short answer: 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…

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

Short answer: 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 execute…

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

Short answer: 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 a…

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

Short answer: 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. Exa…

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

Short answer: The SqlDataAdapter serves as a bridge between a DataSet (or DataTable) and the database. It is responsible for: Real-world example (ShopNest) ShopNest’s reporting job still uses ADO.NET for a heavy SQL quer…

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

Short answer: mount of data quickly and do not need to modify the data. Explain a bit more It requires an open connection to the database and reads data sequentially, one row at a time. mount of data quickly and do not n…

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

Short answer: 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 n…

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();

Short answer: dapter.Fill(dataset, "Customers"); // Fills the DataSet with data from the "Customers" table dapter.Fill(dataset, "Customers"); // Fills the DataSet with data from the "Cu…

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

Short answer: DataSet is a collection of DataTable objects, and it can hold multiple tables and relationships between them. Explain a bit more It is used for handling disconnected data and can work offline, and it can al…

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

Short answer: 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 SqlComman…

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

Short answer: 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). Explain a bit more It provides type sa…

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

Short answer: A 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 SqlTr…

ADO.NET Read answer
Junior PDF
What is the significance of parameters in SQL commands, and how do you handle them in ADO.NET?

Short answer: way to safely and securely inject data into queries, reducing the risk of SQL injection ttacks. Explain a bit more In ADO.NET, you handle parameters using the Parameters collection of a SqlCommand object. w…

ADO.NET Read answer
Junior PDF
What is the significance of parameters in SQL commands, and how do you handle them in ADO.NET?

Short answer: Parameters are used to pass values to SQL commands or stored procedures. They provide a way to safely and securely inject data into queries, reducing the risk of SQL injection attacks. In ADO.NET, you handl…

ADO.NET Read answer
Junior PDF
What is the difference between a forward-only cursor and a static cursor in ADO.NET?

Short answer: snapshot of the data and remains unchanged even if the data in the database changes during the operation. It is slower and consumes more memory compared to forward-only cursor. Real-world example (ShopNest)…

ADO.NET Read answer
Junior PDF
What is the difference between a forward-only cursor and a static cursor in ADO.NET?

Short answer: Forward-only cursor: A cursor that allows you to read rows sequentially in a forward direction only. Explain a bit more It is fast and lightweight, but you cannot go back to previous rows. Static cursor: A…

ADO.NET Read answer
Junior PDF
What is an ADO.NET DataProvider?

Short answer: An ADO.NET DataProvider is a set of classes used to interact with different types of data sources (such as SQL Server, Oracle, etc.). It provides methods for opening connections, executing commands, and ret…

ADO.NET Read answer
Junior PDF
What is the role of the SqlParameter class in ADO.NET?

Short answer: llows you to define the name, data type, size, and value of a parameter. Explain a bit more SqlParameter is used to protect against SQL injection and to pass data to SQL queries safely. llows you to define…

ADO.NET Read answer
Junior PDF
What is the role of the SqlParameter class in ADO.NET?

Short answer: The SqlParameter class represents a parameter to a SQL command or stored procedure. It allows you to define the name, data type, size, and value of a parameter. SqlParameter is used to protect against SQL i…

ADO.NET Read answer
Junior PDF
What is the role of the TransactionScope class in ADO.NET?

Short answer: The TransactionScope class in ADO.NET is used to handle distributed transactions across multiple data sources (e.g., SQL Server and other databases). It simplifies transaction management by automatically ha…

ADO.NET Read answer
Junior PDF
What is the significance of the UpdateCommand property in DataAdapter?

Short answer: dapter.UpdateCommand = new SqlCommand("UPDATE Customers SET Name = @Name WHERE CustomerID = @CustomerID", connection); dapter.UpdateCommand.Parameters.Add("@Name", SqlDbType.NVarChar, 10…

ADO.NET Read answer
Junior PDF
What is the significance of the UpdateCommand property in DataAdapter?

Short answer: The UpdateCommand property of the DataAdapter specifies the SQL command used to update the database when changes are made to the data in the DataSet. The Update() method of the DataAdapter uses the UpdateCo…

ADO.NET Read answer
Junior PDF
What is the difference between data-bound controls and manually bound controls in ADO.NET?

Short answer: Data-Bound Controls: These controls automatically bind to a data source, such as a DataSet or DataTable, and update the UI when the data changes. Examples include GridView, DropDownList, and ListBox. Manual…

ADO.NET Read answer
Junior PDF
What is the advantage of using DataReader for large result sets?

Short answer: The DataReader is more efficient than DataSet when dealing with large result sets because it reads data in a forward-only, read-only manner, without storing the entire result set in memory. This results in…

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

Short answer: A DataRelation defines a relationship between two DataTable objects in a DataSet. It is used to enforce referential integrity and allows for navigating between related data in a parent-child relationship. E…

ADO.NET Read answer

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

Short answer: 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 code

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

Real-world example (ShopNest)

ShopNest opens a SqlConnection only for the query, then disposes it (using). Connection pooling reuses physical connections automatically.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: 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 code

SQL Command: SELECT * FROM Customers; Stored Procedure: EXEC GetCustomerDetails;

Real-world example (ShopNest)

Always pass order ids with parameters: cmd.Parameters.AddWithValue("@id", orderId). Never concatenate user input into SQL.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: 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.

Real-world example (ShopNest)

ShopNest opens a SqlConnection only for the query, then disposes it (using). Connection pooling reuses physical connections automatically.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: 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

Example code

Intermediate ADO.NET Questions

Real-world example (ShopNest)

Always pass order ids with parameters: cmd.Parameters.AddWithValue("@id", orderId). Never concatenate user input into SQL.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

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

Real-world example (ShopNest)

ShopNest’s reporting job still uses ADO.NET for a heavy SQL query where raw performance and stored procedures matter more than EF convenience.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: mount of data quickly and do not need to modify the data.

Explain a bit more

It requires an open connection to the database and reads data sequentially, one row at a time. 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. 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. SqlCommand command = new SqlCommand("SELECT CustomerName FROM Customers", connection); SqlDataReader reader = command.ExecuteReader(); while (reader.Read()) { Console.WriteLine(reader["CustomerName"]); } reader.Close(); 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 code

SqlCommand command = new SqlCommand("SELECT CustomerName FROM Customers", connection); SqlDataReader reader = command.ExecuteReader(); while (reader.Read()) { Console.WriteLine(reader["CustomerName"]); } reader.Close();

Real-world example (ShopNest)

For large order exports, ShopNest uses SqlDataReader (forward-only, fast). DataSet is heavier and mainly for disconnected editing scenarios.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: 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 code

SqlCommand command = new SqlCommand("SELECT CustomerName FROM Customers", connection); SqlDataReader reader = command.ExecuteReader(); while (reader.Read()) { Console.WriteLine(reader["CustomerName"]); } reader.Close();

Real-world example (ShopNest)

For large order exports, ShopNest uses SqlDataReader (forward-only, fast). DataSet is heavier and mainly for disconnected editing scenarios.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

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

Real-world example (ShopNest)

ShopNest opens a SqlConnection only for the query, then disposes it (using). Connection pooling reuses physical connections automatically.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: DataSet is a collection of DataTable objects, and it can hold multiple tables and relationships between them.

Explain a bit more

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.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: 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 code

SqlConnection connection = new SqlConnection(connectionString); connection.Open(); // Execute database commands connection.Close();

Real-world example (ShopNest)

ShopNest opens a SqlConnection only for the query, then disposes it (using). Connection pooling reuses physical connections automatically.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: 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).

Explain a bit more

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.

Real-world example (ShopNest)

For large order exports, ShopNest uses SqlDataReader (forward-only, fast). DataSet is heavier and mainly for disconnected editing scenarios.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: A 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:

Real-world example (ShopNest)

Placing an order updates stock and inserts the order row in one SqlTransaction—either both succeed or both roll back.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: way to safely and securely inject data into queries, reducing the risk of SQL injection ttacks.

Explain a bit more

In ADO.NET, you handle parameters using the Parameters collection of a SqlCommand object. way to safely and securely inject data into queries, reducing the risk of SQL injection ttacks. In ADO.NET, you handle parameters using the Parameters collection of a SqlCommand object. way to safely and securely inject data into queries, reducing the risk of SQL injection ttacks. In ADO.NET, you handle parameters using the Parameters collection of a SqlCommand object. SqlCommand command = new SqlCommand("SELECT * FROM Customers WHERE CustomerID = @CustomerID", connection); command.Parameters.AddWithValue("@CustomerID", customerId); way to safely and securely inject data into queries, reducing the risk of SQL injection ttacks. In ADO.NET, you handle parameters using the Parameters collection of a SqlCommand object.

Example code

SqlCommand command = new SqlCommand("SELECT * FROM Customers WHERE CustomerID = @CustomerID", connection); command.Parameters.AddWithValue("@CustomerID", customerId);

Real-world example (ShopNest)

Always pass order ids with parameters: cmd.Parameters.AddWithValue("@id", orderId). Never concatenate user input into SQL.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: Parameters are used to pass values to SQL commands or stored procedures. They provide a way to safely and securely inject data into queries, reducing the risk of SQL injection attacks. In ADO.NET, you handle parameters using the Parameters collection of a SqlCommand object.

Example code

SqlCommand command = new SqlCommand("SELECT * FROM Customers WHERE CustomerID = @CustomerID", connection); command.Parameters.AddWithValue("@CustomerID", customerId);

Real-world example (ShopNest)

Always pass order ids with parameters: cmd.Parameters.AddWithValue("@id", orderId). Never concatenate user input into SQL.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: snapshot of the data and remains unchanged even if the data in the database changes during the operation. It is slower and consumes more memory compared to forward-only cursor.

Real-world example (ShopNest)

ShopNest’s reporting job still uses ADO.NET for a heavy SQL query where raw performance and stored procedures matter more than EF convenience.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: Forward-only cursor: A cursor that allows you to read rows sequentially in a forward direction only.

Explain a bit more

It is fast and lightweight, but you cannot go back to previous rows. Static cursor: A cursor that allows both forward and backward navigation. It provides a snapshot of the data and remains unchanged even if the data in the database changes during the operation. It is slower and consumes more memory compared to a forward-only cursor.

Real-world example (ShopNest)

ShopNest’s reporting job still uses ADO.NET for a heavy SQL query where raw performance and stored procedures matter more than EF convenience.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: An ADO.NET DataProvider is a set of classes used to interact with different types of data sources (such as SQL Server, Oracle, etc.). It provides methods for opening connections, executing commands, and retrieving data. The main types of DataProviders are: SqlClient (for SQL Server) OleDb (for OLE DB-compatible data sources) Odbc (for ODBC-compatible data sources) Oracle (for Oracle databases)

Real-world example (ShopNest)

ShopNest’s reporting job still uses ADO.NET for a heavy SQL query where raw performance and stored procedures matter more than EF convenience.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: llows you to define the name, data type, size, and value of a parameter.

Explain a bit more

SqlParameter is used to protect against SQL injection and to pass data to SQL queries safely. llows you to define the name, data type, size, and value of a parameter. SqlParameter is used to protect against SQL injection and to pass data to SQL queries safely. llows you to define the name, data type, size, and value of a parameter. SqlParameter is used to protect against SQL injection and to pass data to SQL queries safely. SqlCommand command = new SqlCommand("SELECT * FROM Customers WHERE CustomerID = @CustomerID", connection); SqlParameter parameter = new SqlParameter("@CustomerID", SqlDbType.Int); parameter.Value = customerId; command.Parameters.Add(parameter); llows you to define the name, data type, size, and value of a parameter. SqlParameter is used to protect against SQL injection and to pass data to SQL queries safely.

Example code

SqlCommand command = new SqlCommand("SELECT * FROM Customers WHERE CustomerID = @CustomerID", connection); SqlParameter parameter = new SqlParameter("@CustomerID", SqlDbType.Int); parameter.Value = customerId; command.Parameters.Add(parameter);

Real-world example (ShopNest)

Always pass order ids with parameters: cmd.Parameters.AddWithValue("@id", orderId). Never concatenate user input into SQL.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: The SqlParameter class represents a parameter to a SQL command or stored procedure. It allows you to define the name, data type, size, and value of a parameter. SqlParameter is used to protect against SQL injection and to pass data to SQL queries safely.

Example code

SqlCommand command = new SqlCommand("SELECT * FROM Customers WHERE CustomerID = @CustomerID", connection); SqlParameter parameter = new SqlParameter("@CustomerID", SqlDbType.Int); parameter.Value = customerId; command.Parameters.Add(parameter);

Real-world example (ShopNest)

Always pass order ids with parameters: cmd.Parameters.AddWithValue("@id", orderId). Never concatenate user input into SQL.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: The TransactionScope class in ADO.NET is used to handle distributed transactions across multiple data sources (e.g., SQL Server and other databases). It simplifies transaction management by automatically handling the commit and rollback of transactions across multiple resources.

Example code

using (TransactionScope scope = new TransactionScope()) { SqlConnection connection1 = new SqlConnection(connectionString1); SqlConnection connection2 = new SqlConnection(connectionString2); connection1.Open(); connection2.Open(); // Execute commands on both connections scope.Complete(); // Commit the transaction if everything is successful }

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: dapter.UpdateCommand = new SqlCommand("UPDATE Customers SET Name = @Name WHERE CustomerID = @CustomerID", connection); dapter.UpdateCommand.Parameters.Add("@Name", SqlDbType.NVarChar, 100, "Name"); dapter.UpdateCommand.Parameters.Add("@CustomerID", SqlDbType.Int, 4, "CustomerID"); dapter.UpdateCommand = new SqlCommand("UPDATE… Customers SET Name = @Name…… WHERE CustomerID = @CustomerID", connection);…

Explain a bit more

dapter.UpdateCommand.Parameters.Add("@Name", SqlDbType.NVarChar, 100, "Name"); dapter.UpdateCommand.Parameters.Add("@CustomerID", SqlDbType.Int, 4, "CustomerID"); dapter.UpdateCommand = new SqlCommand("UPDATE Customers SET Name = @Name WHERE CustomerID = @CustomerID", connection); dapter.UpdateCommand.Parameters.Add("@Name", SqlDbType.NVarChar, 100, "Name"); dapter.UpdateCommand.Parameters.Add("@CustomerID", SqlDbType.Int, 4, "CustomerID"); dapter.UpdateCommand = new SqlCommand("UPDATE… Customers SET Name = @Name WHERE CustomerID = @CustomerID", connection); dapter.UpdateCommand.Parameters.Add("@Name", SqlDbType.NVarChar, 100, "Name");…

Real-world example (ShopNest)

Always pass order ids with parameters: cmd.Parameters.AddWithValue("@id", orderId). Never concatenate user input into SQL.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: The UpdateCommand property of the DataAdapter specifies the SQL command used to update the database when changes are made to the data in the DataSet. The Update() method of the DataAdapter uses the UpdateCommand to push changes back to the database.

Example code

SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM Customers", connection); adapter.UpdateCommand = new SqlCommand("UPDATE Customers SET Name = @Name WHERE CustomerID = @CustomerID", connection); adapter.UpdateCommand.Parameters.Add("@Name", SqlDbType.NVarChar, 100, "Name"); adapter.UpdateCommand.Parameters.Add("@CustomerID", SqlDbType.Int, 4, "CustomerID");

Real-world example (ShopNest)

Always pass order ids with parameters: cmd.Parameters.AddWithValue("@id", orderId). Never concatenate user input into SQL.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: Data-Bound Controls: These controls automatically bind to a data source, such as a DataSet or DataTable, and update the UI when the data changes. Examples include GridView, DropDownList, and ListBox. Manually Bound Controls: These controls do not automatically update when the data changes. You need to manually manage data binding, such as updating the display values when the data changes.

Real-world example (ShopNest)

ShopNest’s reporting job still uses ADO.NET for a heavy SQL query where raw performance and stored procedures matter more than EF convenience.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: The DataReader is more efficient than DataSet when dealing with large result sets because it reads data in a forward-only, read-only manner, without storing the entire result set in memory. This results in better performance and lower memory consumption.

Real-world example (ShopNest)

For large order exports, ShopNest uses SqlDataReader (forward-only, fast). DataSet is heavier and mainly for disconnected editing scenarios.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

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

Short answer: A DataRelation defines a relationship between two DataTable objects in a DataSet. It is used to enforce referential integrity and allows for navigating between related data in a parent-child relationship.

Example code

DataRelation relation = new DataRelation("ParentChild", parentTable.Columns["ID"], childTable.Columns["ParentID"]); dataSet.Relations.Add(relation);

Real-world example (ShopNest)

ShopNest’s reporting job still uses ADO.NET for a heavy SQL query where raw performance and stored procedures matter more than EF convenience.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
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