Dataadapter not updating database

Also, if the amount of data is so large that holding it in memory is impractical, you will need to use Sql Data Reader for read-only data.

Really, one could come up with all kinds of exceptions, but the true guiding force should be the requirements of your application which will influence what your design should be.

This avoids a trip to the database, making your application more efficient.

Exceptions to the scenario above include situations where you need to update data.

This Lesson shows how to accomplish something in-between Sql Connection and Sql Data Reader interaction by using the Data Set C# and Sql Data Adapter objects.

With a Sql Data Reader, you have to go back to the database for records every time you show a page.

This requires a new connection for each page load, which will hurt scalability as the number of users increases.

However, there is one overload that accepts a string for the name of the Data Set, which is used if you were to serialize the data to XML.

Since that isn’t a requirement for this example, I left it out.

Leave a Reply