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.
Add your answer
Loading...

Leave a comment

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