ASP.NET

ADO.NET

ADO.NET is a software library in the .NET framework, it consists of software components providing data access services. NET applications that use ADO.NET are:ASP.NET Web Applications, Console Applications, Windows Applications, etc.

Important classes used in ADO.NET are:

Connection Class

These are used to connect to the database (DB). And also manage transactions and connection pooling.

Command Class

It provides methods for storing and executing SQL statements and Stored Procedures. Some of the methods that are executed by the Command Class are:

  • ExecuteReader: The ExecuteReader is used to retrieve a more than one value from DB after the execution of the SQL Statement.
  • ExecuteNonQuery: This method is used for executing statements that do not return result sets (Statements like insert data, update data etc.) .
  • ExecuteScalar: This method is used to retrieve a single value from DB after the execution of the SQL Statement.

DataReader Class

The DataReader is used to retrieve data. It is used along with the Command class to execute an SQL Select statement and then access the returned rows.

DataAdaptor Class

The DataAdapter is used to connect DataSets to DB.

DataSet Class

The DataSet is heart of ADO.NET. They contain multiple Datatable objects, which contain columns and rows, just like normal databasetables. It also contains a Relations collection, which is used to define relations among DataTable Objects.

Author: STEPS

Leave a Reply

Your email address will not be published. Required fields are marked *