Google News
logo
ADO.NET - Interview Questions
Explain about ADO.NET objects.
There are seven main objects in ADO.NET. They are:
 
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.

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.

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.

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.

SQLConnection : It represents an open connection to the data source like SQL Server. This object is similar to the standard Connection object in ADO.

SQLDataReader : It reads a forward-only stream of data from a SQL Server database. It works with an open database connection.

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.
Advertisement