Explain the difference between DataSet and DataReader with?
examples.
- DataSet: Works in a disconnected mode and holds multiple tables and relationships.
You can navigate and manipulate the data offline.
- Example: Use a DataSet to hold customer and order data for offline
processing.
- DataReader: A forward-only, read-only cursor that requires an open connection to
the database. It is faster for reading large amounts of data in a streaming manner.
- Example: Use DataReader when fetching records to display in a report or grid
in a single-pass, forward-only manner.