1.

Explain about ADO.NET objects.

Answer»

There are seven main objects in ADO.NET. They are:

  1. DataSet: It is AVAILABLE under both System.DATA.ADO and the System.Data.SQL namespaces. DataSet is a database cache built-in memory for using it in disconnected operations. It holds the complete collection of tables, constraints, and relationships.
  2. SQLDataSetCommand: It represents a stored procedure or a database query that can be USED to populate the DataSet object. It corresponds to the ADO’s Command object-provided functionalities.
  3. SQLCommand: It represents a stored procedure or a T-SQL statement that will be executed by SQL Server. It corresponds to another set of functionalities provided by the ADO’s Command object.
  4. SQLParameter: It can be used to pass parameters to the object of SQLCommand or SQLDataSetCommand class. When you are passing a parameter for SQLCommand using SQLParameter, SQLParameter will represent a parameter that can be used by T-SQL statement or stored procedure. Whenever a parameter has been passed for SQLDataSetCommand using SQLParameter, SQLParameter will represent a column from a result set.
  5. SQLConnection: It represents an open connection to the data source like SQL Server. This object is SIMILAR to the standard Connection object in ADO.
  6. SQLDataReader: It reads a forward-only stream of data from a SQL Server database. It works with an open database connection.
  7. SQLError: It collects runtime warnings and error conditions related INFORMATION that will be encountered by an ADO.NET application. It corresponds to ADO’s Error object.


Discussion

No Comment Found