Retrieve data source by using the DataReader
A DbDataReader is a forward-only, read-only, server-side cursor, which provides a high-performance method of retrieving data from the data store.
The DbDataReader
object contains a Read
method that retrieves data into its buffer. Only one row of data is ever available at a time, which means that all the data from the database does not need to be completely read into the application before it is processed.
You can use Read
method to get selection results and continuously loop through the results until the end of data has been reached (when the Read
method returns false).
Example with while
loop
while
loopExample with DataTable
DataTable
PreviousBuild command objects and query data from data sourcesNextManage data by using the DataAdapter and TableAdapter
Last updated