{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Net overview managed providers your application

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Managed Provider 16 5/29/2013 5/29/2013 ADO.NET Overview Data Access Styles Connected: Forward-only, read-only Application issues query then reads back results and processes them “Firehose” cursor DataReader object Disconnected Application issues query then retrieves and stores results for processing Minimizes time connected to database DataSet object ADO.NET Overview Data Binding Key component of Web Forms framework Flexible and easy to use Bind a control’s property to information in any type of data store Provides control over how data moves back and forth Simple controls for displaying a single value Complex controls for displaying a data structure <asp:Label runat=server Text='<%# CustList(0).FirstName %>'/> 17 5/29/2013 5/29/2013 Outline Database Theory and History Relational Database Concepts and Terminology ADO.NET Overview ADO.NET Classes ADO.NET Classes IDbConnection Interface Creates a unique session with a data source Implemented by SqlConnection and OleDbConnection Functionality Open, close connections Begin transactions IDbTransaction provide Commit and Rollback methods Used in conjunction with IDbCommand and IDataAdapter objects Additional properties, methods and collections depend on the provider 18 5/29/2013 5/29/2013 ADO.NET Classes IDbCommand IDbCommand Interface Represents a statement to be sent to a data source Usually, but not necessarily SQL Implemented by OleDbCommand and SqlCommand Functionality Define statement to execute Execute statement Pass and retrieve parameters Create a prepared (compiled) version of command ExecuteReader returns rows, ExecuteNonQuery doesn’t, ExecuteScalar returns single value Additional properties, methods and collections depend on the provider ADO.NET Classes IDataReader IDataReader Interface Forward-only, read-only (“fire hose”) access to a stream of data Implemented by SqlDataReader and OleDbDataReader Created via ExecuteReader method of IDbCommand Operations on associated IDbConnection object disallowed until reader is closed 19 5/29/2013 5/29/2013 ADO.NET Classes System.Data.OleDb System.Data.OleDb Namespace Managed provider for use with OLEDB providers SQLOLEDB (SQL Server) – use...
View Full Document

{[ snackBarMessage ]}