Logo F2FInterview

ADO .NET Interview Questions

Q   |   QA
‹‹ previous1234567

ADO.NET (ActiveX Data Objects for .NET) is a set of computer software components that programmers can use to access data and data services. It is a part of the base class library that is included with the Microsoft .NET Framework. It is commonly used by programmers to access and modify data stored in relational database systems, though it can also access data in non-relational sources. ADO.NET is sometimes considered an evolution of ActiveX Data Objects (ADO) technology, but was changed so extensively that it can be considered an entirely new product.

ADO.NET is one of the component in the Microsoft.NET framework which contains following features to Windows, web and distributed applications.

  1. Data Access to the applications from Database in connected (Data reader object) and disconnected (Data set and data table) model.
  2. Modify the data in database from application.

using Dataset.Clear() method you can clear all the data from DataSet

Execute Reader
Execute Reader will be used to return the set of rows, on execution of SQL Query or Stored procedure using command object.
Execute Scalar
Execute Scalar will be used to return the single value, on execution of SQL Query or Stored procedure using command object.
Execute Non Query
If the command or stored procedure performs INSERT, DELETE or UPDATE operations, then we use Execute Non Query method. Execute Non Query method returns an integer specifying the number of rows inserted, deleted or updated.

  1. Create a connection to the database using a connection object.
  2. Open the Database Connection.
  3. Invoke a command to create a Dataset object using an adapter object.
  4. Use the Dataset object in code to display data or to change items in the database.
  5. Invoke a command to update the database from the Dataset object using an adapter object.
  6. Close the database connection.

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's 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.

‹‹ previous1234567

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: