ASP.NET Server-Side Data Acces
Introduction to Server-Side Data
Connections, Commands, and DataSets
Accessing SQL-based Data
Binding SQL Data to a DataGrid
Performing a Parameterized Select
Inserting Data in a SQL Database
Updating Data in a SQL Database
Deleting Data in a SQL Database
Sorting Data from a SQL Database
Working with Master-Detail Relationships
Writing and Using Stored Procedures
Accessing XML-based Data
Section Summary
Introduction to Server-Side Data
Data access is the heart of any real-world application, and ASP.NET provides a rich set of controls that are well-integrated with the managed data access provided in the common language runtime. This section walks through several iterations of a sample that uses the ASP.NET DataGrid control to binding results of SQL queries and XML data files. This section assumes some familiarity with database fundamentals and the SQL query language.
Server-side data access is unique in that Web pages are basically stateless, which presents some difficult challenges when trying to perform transaction as inserting or updating records from a set of data retrieved from a database. As you’ll see in this section, the DataGrid control can help manage the challenges, allowing you to concentrate more on your application logic and less on the details of state management and event handling.
Connections, Commands, and Datasets
The common language runtime provides a complete set of managed data access APIs for data-intensive application development. These APIs help to connect the data and present it in a consistent way regardless of its actual source (SQL Server, OLEDB, XML, and so on). There are essentially three objects you work with most often: connections, commands, and datasets.
- A connection represents a physical connection to some data store, such as SQL Server or an XML file.
- A command represents a directive to retrieve from (select) or manipulate (insert, update, delete) the data store.
- A dataset represents the actual data an application works with. Note that datasets are always disconnected from their source connection and model and can be modified independently. However, changes to a dataset can be easily reconciled with the originating data model.
…
Website: www.anatsoc.org.uk | Filesize: 161kb
No of Page(s): 14
Click here to download ASP.NET Server-Side Data Acces.
Related Tutorial
Tags: .NET, data binding, database connection, SQL, sql data, SQL Query, web application
Comments
Leave a Reply