Hour 5. Connecting to a Data Source

for RuBoard

Hour 5. Connecting to a Data Source

In Hour 2, you saw how to work with DataSet s by creating a few DataTable s and manually adding columns and rows. This is a terrific way to learn how DataSet s work. However, most often data is retrieved from a database and used to populate a DataSet , automatically creating a copy of the database schema and adding the requested data.

However, before you can retrieve anything from your database using ADO.NET, you must create and open a connection to the database using the Connection object. The Connection object uses a database connection string to locate and connect a data source. The exposed properties and methods of the Connection object have changed very little since the days of ADO 2.6.

This hour discusses the properties, methods, and various uses of the Connection object. Specifically, at the end of this hour, you will know how to

  • Use the Connection object to connect to your data source

  • Identify all important parts of a connection string

  • Build a connection string for your data source

for RuBoard


Sams Teach Yourself ADO. NET in 24 Hours
Sams Teach Yourself ADO.NET in 24 Hours
ISBN: 0672323834
EAN: 2147483647
Year: 2002
Pages: 237

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