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

Chapters 14 and 15 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 16 How to use ADO.NET to write your own data access code
How to work with connections and commands 530
How to create and work with connections 530
How to create and work with commands 532
How to use parameters in SQL statements 534
How to create and work with parameters 536
How to execute data commands 538
How to create and work with a data reader 538
How to execute queries that return a single value 540
How to execute action queries 540
A Product Maintenance application that uses data commands 542
The user interface 542
The class design 542
The code for the ProductDB class 544
The code for the Product Maintenance form 552
How to work with datasets and data adapters 558
How to create and work with untyped datasets 558
How to create and work with data adapters 560
How to generate Insert, Update, and Delete commands for a data adapter 562
How to work with transactions 564
How to start a transaction 564
How to associate commands with a transaction 564
How to commit or rollback a transaction 564




Murach's VB 2005

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.