What is the difference b/w sqldatareader and sqldataadapter? For what purpose are they used in a database connection & how do they differ from each other? Pls explain me in detail.
Regards
Vijay.
Not much to compare about between these two. They are too different from each other.
A SqlDataReader is a data provider that allows a forward-only and read-only access to the data/result set. Meaning that you can't modify any data in the SqlDataReader object and you can only read data sequentially and forward-only. Meaning once you're on the second set of data you can't go back and read the first set. A SqlDataAdapter basically acts like a bridge between a data provider and a dataset. It's what connects your data in its native storage format in the database and your data in a more suitable representation designed for manipulation in your application. Think of it like an interpreter between two people speaking in different languages.