Chapter 5: Working with the .NET Data Providers

Microsoft Exam Objectives Covered In This Chapter:

  • Access and manipulate data from a Microsoft SQL Server database by creating and using ad hoc queries and stored procedures.

The task of data access is common to almost every business application that you will develop. Accordingly, this topic is emphasized in the certification exams. To thoroughly cover all the new capabilities for working with data in the .NET Framework classes, this book divides the overall topic of data access into three chapters.

This chapter and Chapter 6, “Working with the DataSet,” cover the classes found in the System.Data namespace, what we know as ADO.NET. ADO.NET is Microsoft’s newest object model for data access. The classic ADO object model, introduced about five years ago, offered relatively few objects to work with, but each of those objects had long lists of properties and parameters that enabled the developer to fine-tune their behavior for different tasks. ADO.NET offers a larger number of classes, but each is designed to perform a specific task.

Chapter 7, “Working With XML Data,” shows both the XML capabilities of ADO.NET and the classes in the System.XML namespace. You will see where the functionality overlaps and learn which classes to choose to get your work accomplished.

Within the System.Data namespace, you will find many new objects, the examples in the chapter will help you understand the differences between the old ADO model and the new ADO.NET model, and how to choose which of the new classes to use for a specific task. This book makes the distinction between objects that operate directly against the database—such as Connections, Commands, and the DataReader—and the new ADO.NET DataSet object, which is a disconnected data store providing considerable functionality to your applications for working with data.

This chapter covers direct database access. It begins with a discussion of the differences between the .NET data providers. Then you will learn about connecting to a database. You will learn how to use the versatile Command object to create a DataReader; to send SQL insert, update, and delete instructions; and to call stored procedures with parameters. The chapter concludes with some of the other classes in the new ADO.NET model, including the Transaction, Exception, and Error classes.



MCAD/MCSD(c) Visual Basic. NET XML Web Services and Server Components Study Guide
MCAD/MCSD: Visual Basic .NET XML Web Services and Server Components Study Guide
ISBN: 0782141935
EAN: 2147483647
Year: 2005
Pages: 153

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net