Chapter 7: Connecting to a Database

Overview

In this chapter, you'll learn the details on connecting to a database using objects of a Connection class. There are three Connection classes: SqlConnection, OleDbConnection, and OdbcConnection. You use an object of the SqlConnection class to connect to a SQL Server database, an object of the OleDbConnection class to connect to any database that supports OLE DB, such as Oracle or Access, and an object of the OdbcConnection class to connect to any database that supports ODBC. Ultimately, all communication with a database is done through a Connection object.

Featured in this chapter:

  • Using a SqlConnection object to connect to a SQL Server database

  • Connection pooling

  • Getting the state of a Connection

  • Using Connection events

  • Creating a Connection object using Visual Studio .NET




Mastering C# Database Programming
Mastering the SAP Business Information Warehouse: Leveraging the Business Intelligence Capabilities of SAP NetWeaver
ISBN: 0764596373
EAN: 2147483647
Year: 2003
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net