Summary


This chapter has been devoted entirely to the often-thorny problems we encounter when updating a relational data source such as a SQL database from within our applications. While the techniques have focused on using the .NET data access classes with a relational database, bear in mind that the connection between our code and the data store is via standard methods such as OLE-DB and ODBC. This means that, as new managed providers become available, we can use the same techniques to work with other data stores such as mail servers, active directory, indexing services, etc.

The chapter began with a look at the techniques we often use to perform single operations against a data store “ such as inserting a user 's name and e-mail address into a database, or deleting rows in response to a user's input. We demonstrated how to do this with both SQL statements and with stored procedures. We also looked at how we can use transactions to provide better data integrity. We used both database transactions and .NET connection-based transactions.

However, the main focus of the chapter was on how we use the new DataSet object to store and then update data in a disconnected environment. We saw how we can use the Update method of the DataAdapter to push updates into a data store automatically, and how we can carry out the task ourselves in a staged and more controllable manner.

We finished up with a look at a major issue in all multi-user environments “concurrent data updates. We saw how we can work round the problem using our own custom methods, and how the .NET data access classes provide other techniques that make it much easier than the data access technologies we used in previous versions of ASP.

This chapter completes our look at how to work with relational data within .NET using the new data- access classes that the framework provides. However, the ceaseless advance of XML into our daily data- handling lives requires us to be competent in handling this new type of data format, as well as being proficient in handling relational data. And, to help us out, the .NET classes provide useful integration between relational and XML data. In the next chapter we'll explore this topic, and see other ways that we can access and manipulate XML.




Professional ASP. NET 1.1
Professional ASP.NET MVC 1.0 (Wrox Programmer to Programmer)
ISBN: 0470384611
EAN: 2147483647
Year: 2006
Pages: 243

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net