12. Understanding .NET Data Provider Connectivity : .NET Data Provider Architecture : Data Retrieval Strategies
 
Share this page                  
Data Retrieval Strategies
The .NET Data Provider provides ADO.NET programmers with two access strategies for retrieving data:
DataReader—This program retrieves the data for read-only, forward-only access. The program opens the connection, executes the command, processes the rows in from the reader, closes the reader, and closes the connection. Resources on the database server are held until the connection is closed. For additional information, see IngresDataReader Class (see page IngresDataReader Class).
DataAdapter—This program opens the connection, fills a DataSet, closes the connection, processes the DataSet, opens the connection, updates the database, and closes the connection. Resources on the database server are not held during the processing of the DataSet. Using connection pooling, usually only one physical connection is used. For additional information, see IngresDataAdapter Class (see page IngresDataAdapter Class).
In addition to the low-level DataReader and DataAdapter access strategies, the data provider works with Visual Studio to support TableAdapter, DataConnection, and DataSource components. The data provider uses standard base classes, interfaces, and metadata methods to support higher level data-bound .NET Framework controls. .NET Framework and Visual Studio work with the .NET Data Provider to offer more rapid application development and high quality code.