Algebra lineal

Páginas: 7 (1546 palabras) Publicado: 5 de julio de 2011
Unit 6: Accessing and Displaying Data
Overview
Database Connections and the Web.Config File Relational Data and Data Source Controls XML Data and Data Source Controls Object Data and Data Source Controls Lab Scenario Lab Task and Objectives Lab: Accessing and Displaying Data

Introduction
This unit describes how to add database connections to the Web.Config file and the benefits that thisapproach adds when building manageable Web applications. This unit then describes the new data controls for accessing data in a variety of formats. It includes details about using the SqlDataSource control, the XmlDataSource control, and the ObjectDataSource control. This unit also describes how user interface data controls are bound to the data source controls, and it includes a discussion aboutbinding data-aware standard controls to data.

Objectives
After completing this module, students will be able to: Explain how to store and retrieve database connections by using the Web.Config file. Explain how to use data source controls to access relational data. Explain how to use data source controls to access XML data. Explain how to use data source controls to access object data. Createand retrieve database connections by using the Web.Config file. Access relational data by using the SqlDataSource control and data controls. Access XML data by using the XmlDataSource control and data controls. Access objects as data by using the ObjectDataSource control and data controls.

Unit 6: Accessing and Displaying Data

Introduction
Web application use database connections as theunderlying mechanism for retrieving data from database and for inserting, updating and deleting data.

Database Connection and Connection Strings
You define database connection in terms of a string that specifies the properties of the connection. These properties usually include the location of the database and security information for accessing the database. Different database supportdifferent properties and therefore require different connection strings; the connection string format depends on the provider being used to open the connection. For example, the provider for Microsoft SQL Server database supports both Microsoft Windows authenticated logins and SQL Server authenticated logins and it requires the name of the server to be included in the connection string. Conversely, theprovider for Microsoft Office Access does not support Windows authenticated logins, and it requires the file path to the access database file rather than a server name.

Using the Web.config File to Simplify connection String Management
Although you can had-code connection strings into your Web application pages, this approach can lead to a difficult-to-manage solution. It is not usual for datasource to be moved, defined, or upgraded after an application has been released. For example, you might initially deploy a small web site with an access database. As the usage and number of visitors to the site increases, you might decide to upgrade to SQL Server. If you have hard-code all the connection to use the access database, you will have to replace every occurrence with the newconnection detail for the SQL Server database. However, if you have used the Web.Config file to store connection strings, and your web page have retrieved the details from the Web.Config file at run time, your solution will be more manageable because you will need only to change the connection details in the Web.Config file.

2

www.intech.edu.pe

Unit 6: Accessing and Displaying Data

Connectiondetails are also typically stored in the Web.Config file to ease the deployment of the Web application from the development environment to the testing, staging, and production environments, each of which will typically have different database servers. The following example show part of the Web.Config file with a connection string. SQL Server authenticated Windows authenticated

The...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Algebra Lineal
  • Algebra Lineal
  • Algebra Lineal
  • algebra lineal
  • Algebra Lineal
  • algebra lineal
  • Algebra lineal
  • Algebra Lineal

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS