Which ADO.NET class is responsible for establishing a connection to a database?
- SqlCommand
- SqlConnection
- SqlDataAdapter
- SqlDataReader
SqlConnection is used to establish a connection to a database in ADO.NET.
Loading...
Related Quiz
- In LINQ to Objects, what type of data source does it query?
- What is the difference between a DataRow and a DataTable in ADO.NET?
- What is the purpose of the DataMember property in data binding?
- Scenario: You are building a database-driven application, and you need to add new records to a database table. Which ADO.NET command would you use for this task?
- How can you handle exceptions when executing non-query commands in ADO.NET?