In this chapter, you looked at connections using various data providers. You learned about connection strings and connection string parameters, and you saw how to open and close connections.
You examined different security options for SQL Server and other data sources and also saw how to display information about the connection after it’s established, using the properties of a connection.
You saw how to handle exceptions generated by connection errors and learned to close the connection in the finally block of the exception handler to ensure that the connection is closed in all cases.
In the next chapter, you’ll look at ADO.NET commands and see how to use them to access data.
KeywordsData Provider Exception Handler Open Connection Reference Item Integrate Security
Unable to display preview. Download preview PDF.