* I was just wondering why use datasets in ASP .NET 2.0?
* Is is better than accessing data from a database (using something like sql datasource)? (I saw the video on data access in the home page, and they create a data set, and select object datasource and use it for data access).
* Is there a performance difference by using data sets, or is it just to group data together for easier future use?
Please also correct me if my undestanding is wrong.
For your first two points... a DataSet could (and probably will) pull its data from a Database... so comparing the two makes no sense
as for some talk about performance, differences, this is a great article
http://aspnet.4guysfromrolla.com/articles/052103-1.aspx
Hi!
It is always better to go for DataReaders when it comes to building ASP.NET applications. With reference to the first two points that you mentioned, the data is any way pulled from a SQL datasource or any other datasources to fill the dataset. Use DataReaders for data access in ASP.NET simply for its brilliant performance advantage over DataSets, even though DataSets are pretty easy to use. Check out this linkhttp://2leggedspider.wordpress.com/2005/02/14/datasets-or-datareaders/
Cheers,
Sumit
Dataset is a disconnected architecture. So further you can work on dataset not database directly. Later using data adapter you can save changes to database.
Dataset object can hold more than one table from the datasource as well as the relationships between them.
Dataset has support to XML. But speed wise dataset are slower because of relationships among tables, no. of tables decrease its speed.
When you required disconnected architecture and want to perform some CRUD (Create, Retrieve, Update, Delete) operations then Dataset preferred. If you just want to read data then DataReader is good.
Regards.
Kuldeep Deokule
http://dkuldeep.blogspot.com
0 comments:
Post a Comment