Updating ADO.NET

Chapter 19 demonstrated how to retrieve data from a database and display it in various ways. In many cases, you will also want to allow the user to interact with your application to modify the data, and you must write these changes back to the database.

Two aspects to writing applications allow users to update data. The first is to provide the user with controls to modify the data. Methods to enter the proposed changes include the use of controls such as listboxes and radio buttons for making selections and text boxes for editing text entries. You'll find extensive coverage of these controls in Chapters 5 through 9.

Once you know what changes the user wants to make, your program must then provide code for updating the database. To keep the focus on the database issues, the examples in this chapter show very little of the user interface. Many examples use hardcoded data changes; others use a quick and dirty form for updating the data tables.

Updating data in a database is simple if you update only a single table, but things can be more complicated once you update related tables. This chapter explores how transactions ensure your data's integrity.

Since your program may be used by more than one user at a time, you will encounter issues with concurrency: is it possible for one user's changes to overwrite the changes of another user? This chapter explores how to manage concurrency issues and shows some of the powerful support available in the .NET Framework that simplifies this difficult task.

Windows Forms and the .NET Framework

Getting Started

Visual Studio .NET

Events

Windows Forms

Dialog Boxes

Controls: The Base Class

Mouse Interaction

Text and Fonts

Drawing and GDI+

Labels and Buttons

Text Controls

Other Basic Controls

TreeView and ListView

List Controls

Date and Time Controls

Custom Controls

Menus and Bars

ADO.NET

Updating ADO.NET

Exceptions and Debugging

Configuration and Deployment



Programming. NET Windows Applications
Programming .Net Windows Applications
ISBN: 0596003218
EAN: 2147483647
Year: 2003
Pages: 148

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