Chapter 12: ADO.NET and Database Development


Overview

You've already looked at two of the four common methods of getting input into and out of your .NET Windows applications: streams and controls. ADO.NET, which you'll cover in detail in this chapter, is the third. In next chapter, you'll round it out with XML, the fourth and final common method. ADO.NET is a huge topic. In this chapter you'll learn about some of the more commonly used aspects of it.

When you're implementing with ADO.NET, you're dealing with data stores or, to use the better-known term, databases. Most developers are going to have to deal with the database. If that thought frightens you, it shouldn't, as ADO.NET has made the database an easy and, dare I say, fun thing to work with. The hard part now is no longer interfacing with the database, be it a 2-tier, 3-tier, or even n-tier architecture, but instead designing a good database. Hey—Visual Studio .NET even works with you there!

The language of relational databases is still SQL. That doesn't change with ADO.NET. If you don't know SQL, then you might need to read up on it a little bit. However, for those of you who don't know SQL, I made this chapter's SQL code rudimentary, to say the least. SQL is a very powerful language and most programmers should have at least some SQL knowledge. But don't fret if you don't, as the SQL you'll find in this chapter isn't important in your understanding of ADO.NET. What I'm basically trying to say in a long, roundabout way is that this chapter is about ADO.NET and not SQL.

This chapter starts by covering the basic concepts of ADO.NET. You'll then move on to building, from scratch, a (very simple) database using Visual Studio .NET. Then, using this database, you'll examine in detail the two methods provided by ADO.NET to access a database: connected and disconnected.

Those of you who have read my book Real World ASP.NET: Building a Content Management System (Apress, 2002) might find some of the material similar as you're going to be using the database I developed in that book.




Managed C++ and. NET Development
Managed C++ and .NET Development: Visual Studio .NET 2003 Edition
ISBN: 1590590333
EAN: 2147483647
Year: 2005
Pages: 169

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