Chapter 4. Adding and Modifying Data
Introduction
This chapter focuses on issues related to inserting and updating data as well as using web services, remoting, and messaging to update data.
Web services allow distributed applications running on disparate platforms to communicate using open standards and ubiquitous protocols. Recipe 4.11 shows how to create a web service that lets a client update a database, and how to call the web service from a .NET application. Similarly, Recipe 4.12 shows how to create a.NET remoting component that lets a client update a database, and how to call the remote objects from a .NET application.
Messaging allows applications running on disparate platforms to communicate whether they are connected or disconnected. Recipe 4.13 shows how to use messaging to update a database.
In addition to these topics, this chapter also covers:
- Identity and auto-increment columns
ADO.NET provides an auto-incrementing column type that generates a unique value for each new row. There is no mechanism to ensure that the values are unique from the values produced by other users. Recipe 4.1 shows how to use auto-incrementing columns to ensure that the values generated by different users do not conflict.
SQL Server has an identity column that is also an auto-incrementing column type. This value is used rather than the ADO.NET auto-increment column type when adding new records; there is no automatic way to keep these values synchronized after new rows in a
DataTablehave been inserted ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access