I'm working on a CMS/e-learning type web app and just wondering how best to handle the following:
* User updates information on a page and this info is updated in the database.
* Updated info needs to be displayed on the page after PostBack - which would be the most efficient way to do this?
* Info is stored in a DataTable object
1) Include a SELECT statement in the stored proc when updating the database and output this to a new DataTable object.
2) Loop through the existing DataTable object and update the rows required.
Since I have to make a database call to update the database anyway, am I going to incur much of a performance overhead by adding in the SELECT statement?
Just wondering if anyone has any opinions on whether one option is better than the other?
* User updates information on a page and this info is updated in the database.
* Updated info needs to be displayed on the page after PostBack - which would be the most efficient way to do this?
* Info is stored in a DataTable object
1) Include a SELECT statement in the stored proc when updating the database and output this to a new DataTable object.
2) Loop through the existing DataTable object and update the rows required.
Since I have to make a database call to update the database anyway, am I going to incur much of a performance overhead by adding in the SELECT statement?
Just wondering if anyone has any opinions on whether one option is better than the other?