Scenario: You are developing a Windows Forms application that needs to display and edit data from a database. Which ADO.NET component would you use to store and manage the data in a tabular format?

  • SqlConnection
  • SqlDataAdapter
  • SqlDataReader
  • DataTable
DataTable is the correct option. It represents one table of in-memory data. It can be used to store and manage data retrieved from a database or any other data source. SqlConnection is used to establish a connection to a database. SqlDataAdapter is used to populate DataTables with data from the database. SqlDataReader is used to read data from a database in a forward-only, read-only manner.
Add your answer
Loading...

Leave a comment

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