Murach's C# 2005
How to use ADO.NET to write your own data access code

Chapters 18 and 19 show you how to use data sources to develop database applications. When you do that, Visual Studio generates the ADO.NET objects you need. Now, this chapter shows you how to create and work with ADO.NET objects through code. That lets you separate the data access code from the presentation code by placing the ADO.NET code in database classes, which are often reusable from one application to another.

Chapter 20 How to use ADO.NET to write your own data access code
How to work with connections and commands 630
How to create and work with connections 630
How to create and work with commands 632
How to use parameters in SQL statements 634
How to create and work with parameters 636
How to execute data commands 638
How to create and work with a data reader 638
How to execute queries that return a single value 640
How to execute action queries 640
A Product Maintenance application that uses data commands 642
The user interface 642
The class design 642
The code for the ProductDB class 644
The code for the Product Maintenance form 652
How to work with datasets and data adapters 658
How to create and work with untyped datasets 658
How to create and work with data adapters 660
How to generate Insert, Update, and Delete commands for a data adapter 662
How to work with transactions 664
How to start a transaction 664
How to associate commands with a transaction 664
How to commit or rollback a transaction 664




Murach's C#

Learn more about this book

View the table of contents

Add this book to your cart



Our Ironclad Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a full refund...no questions asked.