7/31/2010
LifeCycle Solutions - Home ( the software development blog )
 

<July 2006>
SunMonTueWedThuFriSat
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

Subscribe to this feed:

RSS 2.0 | Atom 1.0 |CDF

On this Page:
The DataSet DataSource





Tuesday, July 25, 2006

The introduction of the DataSource model in .NET 2.0 has made it much easier to perform data binding in ASP.NET.  In most cases, it's trivial to use the SqlDataSource and ObjectDataSource for purposes of binding and updating the backing data store when a single row is changed.  However, there's no out-of-the-box way to use a DataSet itself as the backing data store and later persist its entire batch of data to the database.  Consider a shopping cart scenario in which you are adding multiple rows to a temporary data store...you don't necessarily want to go to the DB each time a row is added; rather, you'd prefer to perform a batch update at the end of the process.

Andres Aguiar presents a good solution to the problem by creating a custom data source for this purpose -- the DataSetDataSource.

Posted by Brian Parks

© 2006 LifeCycle Solutions, LLC | All Rights Reserved