Recall that the connected layer of ADO.NET allows you to interact with a database using the connection, command, and data reader objects of your data provider. You have already used these objects in the previous DataProviderFactory application, now you'll walk through the process again, this time using an expanded example. You need to perform the following steps when you wish to connect to a database and read the records using a data reader object:
Allocate, configure, and open your connection object.
Allocate and configure a command object, specifying the connection object as a constructor argument or with the Connection property.
Call ExecuteReader() on the configured command class.
Process each ...