8/28/2008
LifeCycle Solutions - Home ( the software development blog )
 

<August 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456

Subscribe to this feed:

RSS 2.0 | Atom 1.0 |CDF

On this Page:
The DataSet DataSource




Add to Technorati Favorites

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