CONTENTS
Authoring the GetPetName() Stored Procedure .................................................................................... 819
Creating the Customers and Orders Tables.......................................................................................... 820
Visually Creating Table Relationships................................................................................................... 823
The ADO.NET Data Provider Factory Model ...................................................................824
A Complete Data Provider Factory Example ......................................................................................... 825
A Potential Drawback with the Data Provider Factory Model............................................................... 828
The Element....................................................................................................... 829
Understanding the Connected Layer of ADO.NET ..........................................................830
Working with Connection Objects......................................................................................................... 831
Working with ConnectionStringBuilder Objects.................................................................................... 833
Working with Command Objects .......................................................................................................... 834
Working with Data Readers ...........................................................................................835
Obtaining Multiple Result Sets Using a Data Reader............................................................................ 837
Building a Reusable Data Access Library ......................................................................838
Adding the Connection Logic................................................................................................................ 839
Adding the Insertion Logic.................................................................................................................... 840
Adding the Deletion Logic..................................................................................................................... 841
Adding the Update Logic ...................................................................................................................... 841
Adding the Selection Logic ................................................................................................................... 842
Working with Parameterized Command Objects .................................................................................. 843
Executing a Stored Procedure .............................................................................................................. 845
Creating a Console UI–Based Front End ........................................................................847
Implementing the Main() Method ......................................................................................................... 847
Implementing the ShowInstructions() Method...................................................................................... 849
Implementing the ListInventory() Method............................................................................................. 849
Implementing the DeleteCar() Method.................................................................................................. 850
Implementing the InsertNewCar() Method............................................................................................ 851
Implementing the UpdateCarPetName() Method .................................................................................. 851
xxxiii