Murach's C# 2008
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 610
How to create and work with connections 610
How to create and work with commands 612
How to create and work with parameters 614
How to use parameters in SQL statements 614
How to create parameters 616
How to work with parameters 618
How to execute commands 620
How to create and work with a data reader 620
How to execute queries that return a single value 622
How to execute action queries 622
A Customer Maintenance application that uses commands 624
The user interface 624
The class diagram for the business and database classes 626
The code for the CustomerDB class 628
The code for the StateDB class 634
The code for the MMABooksDB class 634
The code for the Customer Maintenance form 636
The code for the Add/Modify Customer form 642




Murach's C# 2008

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.