ADO.Net Interview Question and Answers

76. What is SqlDataAdapter Object?
 
  • The object takes the help of all the above objects to work with the underlying database.
  • It makes use of the connection object to establish connection with the database, uses the command object to execute Sql commands on the connected database.
 
Your Name Your Email-ID
Your Answer
77. What is the DataTableCollection?
  An ADO.NET DataSet contains a collection of zero or more tables represented by DataTable objects.
The DataTableCollection contains all the DataTable objects in a DataSet.
 
Your Name Your Email-ID
Your Answer
78. How would you connect to a database by using .NET?
  The connection class is used to connect a .NET application with a database.
 
Your Name Your Email-ID
Your Answer
79. What are the different methods available under sqlcommand class to access the data?
 
  • ExecuteReader - Used where one or more records are returned - SELECT Query.
  • ExecuteNonQuery - Used where it affects a state of the table and no data is being queried - INSERT, UPDATE, DELETE, CREATE and SET queries.
  • ExecuteScalar - Used where it returns a single record.
 
Your Name Your Email-ID
Your Answer
123456789101112


13141516 Page 16 of 16