20 March 2013

ADO.Net Interview Questions and Answers Part -II

ADO.Net Interview Questions and Answers:
Part -II

1) Difference between ADO Recordset and Dataset?
             ADO Recordset:
                                One Row at an instant.
                                It needs an open connection to read the data from data source.
                                Able to load the structure and data of only one data at a time.
                                It doesn't support constraints of Databases.
                           Data structure which represents complete table data at same time.
                          It needs connection only for retrieving the data. After retrieve the data connection is not necessary.
                         Capability to store the structure and data of multiple tales at a time.
                         Uses constraints object to enforce data integrity by using constraints.

2)  Explain ExecuteReader?
          This Method returns an abject of a data reader such as SQLDataReader.
          An Object of the Connection class must invoke open method to open the database before the object of command class can Execute "ExecuteReader" method.

3) Explain ExecuteNonQuery?
        This method an integer which represents the number of rows that are affected by SQL Query executed by the object of command class.
4) Explain ExecuteScalar?
       This method returns a single value from a datasoruce.
5) Concepts of DataAdapter?
      Bridge between Dataset and Database.

No comments: