Hi,
I can see many threads around DataSet and Datareader. It all says,
Datareader is faster, read/forward only , connected architecture etc.
where as Dataset is disconnected model so user can work offline and update the Database later on, thus saving connection resource to remain open for longer.
I do understand above points.
But I am quite confused with respect to below points:
1) I need to just show some records to my grid in UI (which i can bind with DataSet or Collection list)
In the DAL layer i can use DataReader to populate my list, send it to client and bind with Grid. Or I could have used DataAdapter to fill dataset and send that Dataset to client to bind with Grid.
So in above scenario it means i discussed both approach (connected and disconneted)..right?
My question is: which approcah is better ?
If Answer is "DataReader", since DataRedaer is faster and we dont need any DML operations and just need to present data, than
Anyway i need to have data popuated in either list or dataset from reader one by one, so why not DataAdapter.Fill() to get Dataset directly ?
Second qusetion, how one can perform DML operation in connected mode ? Data reader is read/forward only..right?
Please help me overcoming this confusion.
i think some practical example which to diffrenciate btwn two would be helpful.
Thanks
Rahul