C H A P T E R 12
Making Connections
Before you can do anything useful with a database, you need to establish a session with the database server. You do this with an object called a connection, which is an instance of a class that implements the System.Data.IDbConnection
interface for a specific data provider. In this chapter, you’ll use various data providers to establish connections and look at problems that may arise and how to solve them. In this chapter, we’ll cover the following:
- Introducing data provider connection classes
- Connecting to SQL Server with
SqlConnection
- Improving your use of connection objects
- Connecting to SQL Server with
OleDbConnection
Introducing the Data Provider Connection Classes
As you saw in Chapter 10, each ...
Get Beginning C# 5.0 Databases, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.