ADO.NET provides the SqlConnection ___________ method to explicitly close a database connection.
- Disconnect()
- Close()
- Dispose()
- Release()
In ADO.NET, the SqlConnection class offers the Close() method to explicitly close a database connection. This method ensures that the connection to the database is properly terminated, releasing associated resources. Although there are methods like Dispose() and Disconnect(), they don't directly serve the purpose of closing the connection in the SqlConnection class. Therefore, "Close()" is the correct option.
Loading...
Related Quiz
- Entity Framework allows you to perform ___________ operations on database records.
- Scenario: You want to implement a feature where users can group data by a specific column in the table. Which control would be more suitable for this task, DataGrid or DataGridView, and how would you achieve it?
- LINQ to Entities allows developers to write queries using ___________ syntax.
- Scenario: You are tasked with optimizing the performance of an application that displays complex hierarchical data. What strategies and best practices related to DataRelations would you consider?
- What is the primary role of the OleDb data provider in ADO.NET?