Murach's C#
How to work with ADO.NET classes through code
This chapter shows you how to separate the database processing code from the user
interface code by creating a separate database class to handle your application's
database access. To do that, you must write code that creates and works with the data
adapter, connection, and command objects. This chapter also shows you how to execute
data commands without using a data adapter, how to process the results using a data
reader instead of a dataset, and how to create and use transactions to insure data
integrity when related tables are updated. With these skills, you'll be able to create
database classes that provide the methods that do all the database processing for
an application, which is the way it's commonly done in the real world.
|
|
|
|
How to create and work with connections |
610 |
|
How to create and work with commands |
612 |
|
How to use parameters in SQL statements |
614 |
|
How to create and work with parameters |
616 |
|
|
How to create and work with a data reader |
618 |
|
How to execute queries that return a
single value |
620 |
|
How to execute action queries |
620 |
|
|
How to create and work with untyped
datasets |
622 |
|
How to create and work with data adapters |
624 |
|
|
The design of the Product Maintenance
application |
626 |
|
The code for the database classes |
628 |
|
The code for the form class |
634 |
|
|
How to create and work with transactions |
640 |
|
An Order Entry application that uses
a transaction |
642 |
|
The code for the OrderDB class |
644 |
|
 |
|
|
|
|
© Copyright 1998-2008 Mike Murach &
Associates, Inc. All rights reserved.
|