Wiley Beginning ASP.NET 1.1 with VB.NET 2003 978-0-7645-5707-1 ユーザーズマニュアル

製品コード
978-0-7645-5707-1
ページ / 38
8
Reading From Databases
So far in this book you've learnt a lot about programming, and seen those techniques in use in a
variety of Web pages. Now it's time to turn our attention to one of the most important topics of
building Web sites – data. Whatever the type of site you aim to build, data plays an important
part. From a personal site (perhaps a vacation diary or a photo album), to a corporate e-commerce
site, data is key.
There are many ways in which data can be stored, but most sites will probably use a database. So in
this chapter we're going to look at data stored in databases, and show how easily it can be used on
Web pages. For this we are going to use ADO.NET, which is the data access technology that comes
as part of the .NET Framework.
If the thought of databases sounds complex and scary, don't worry. We're going to show you just
how easy this can be. In particular, we'll be looking at:
Basics of databases and how they work
Creating simple data pages using Web Matrix
Different ADO.NET classes used for fetching data
Basics of ADO.NET and how it fetches data
Using Web Matrix to simplify developing data access pages
Before we can head into these topics though, we need a little theory.
Understanding Databases
Understanding some basics about databases is crucial to using data in your pages. You don't need
to be a database expert, but there are certain things you will need to know in order to work with
data in .NET. For a start, you need to understand how data is stored. All types of data on a 
computer are stored in files of some sort. Text files, for example, are simple files and just contain
the plain text. Spreadsheets, on the other hand, are complex files containing not only the entered
text and numbers, but also details about the data, such as what the columns contain, how they are
formatted, and so on.
57076_Ch 8 SAN.qxd  01/12/2003  6:43 PM  Page 249