Hour 14. Accessing Data with the Data Source Web Controls


In this hour, we will cover

  • Working with data source controls

  • Understanding SQL, the language of databases

  • Retrieving specific columns from a database table

  • Returning database data that meets certain criteria

  • Ordering the results of a database query

In the preceding hour we examined, from a high-level perspective, what databases are, their internal structure, and their purpose. We looked at creating a database with SQL Server 2005 Express Edition through Visual Web Developer. We also saw how to create database tables and populate them with data.

Often we will want to retrieve information from a database and display it on an ASP.NET web page. To be able to do this, we need to learn how to retrieve data from a database. ASP.NET provides a set of Web controlscalled data source controlsthat are designed specifically to access data from an underlying database. With the data source controls, retrieving database data is as simple as dropping a control onto your ASP.NET page and stepping through a wizard, indicating the database data you want to grab.

Underneath the covers, the data source controls are simply sending commands to the database using a language called Structured Query Language, or SQL (pronounced either S-Q-L or Seequell). SQL is the language used by all modern database systems for retrieving data. In addition to examining the ASP.NET data source controls, we'll also spend a bit of time in this hour learning the general syntax of SQL.




Sams Teach Yourself ASP. NET 2.0 in 24 Hours, Complete Starter Kit
Sams Teach Yourself ASP.NET 2.0 in 24 Hours, Complete Starter Kit
ISBN: 0672327384
EAN: 2147483647
Year: 2004
Pages: 233

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