DbProviderFactory dbFactory =
	DbProviderFactories.GetFactory(NWindProviderName);
DbConnection cn = dbFactory.CreateConnection();
cn.ConnectionString = NWindConnectionString;
DbCommand cmd = cn.CreateCommand();
cmd.CommandText = "SELECT c.CustomerID, c.CompanyName, c.ContactName, " +
"o.OrderID, o.OrderDate FROM Customers AS c INNER JOIN Orders AS o " +
"ON c.CustomerID = o.CustomerID";

using (cn) {
	cn.Open();
using (DbDataReader dr = cmd.ExecuteReader(
												CommandBehavior.CloseConnection)) {
gridCustomersOrders.DataSource = dr;
gridCustomersOrders.DataBind();
}
}
