CIS 375—Web App Dev II ASP.NET 9 Database. 2 ADO.NET What is ADO.NET? ADO.NET is a part of the.NET Framework ADO.NET consists of a set of classes used.

Slides:



Advertisements
Similar presentations
Direct Data Access, Data Binding. Content Direct Data Access Data Binding Muzaffer DOĞAN - Anadolu University2.
Advertisements

By Chris Pascucci and FLF
ASP.NET 2.0. What is ASP.NET is a server-side scripting language developed by Microsoft is the next generation of ASP (Active Server Pages), completely.
Introduction to Database Processing with ADO.NET.
VB.NET Database Tools ISYS Net Applications OLE DB Provider OLE DB Data Source OLE DB Provider ODBC Data Source SQL Server Data Source SQL Server.Net.
1 ADO.NET. 2.NET Framework Data Namespaces System.Data –Base set of classes and interfaces for ADO.NET System.Data.Common –Classes shared by the.NET Data.
ASP.NET Database Connectivity I. 2 © UW Business School, University of Washington 2004 Outline Database Concepts SQL ASP.NET Database Connectivity.
VB.NET Database Tools ISYS 573. Microsoft Universal Data Access ODBC: Open Database Connectivity –A driver manager –Used for relational databases OLE.
C# Programming: From Problem Analysis to Program Design1 Working with Databases C# Programming: From Problem Analysis to Program Design 3 rd Edition 14.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 14: Advanced Topics: DBMS, SQL, and ASP.NET
Chapter 12 Database Connectivity with ASP.NET JavaScript, Third Edition.
Objective In this session we will discuss about : What is ADO. NET ?
Lecture 11: Programmatic Database Access with ADO.NET.
Overview of ADO.NET Chapter 1 ADO.NET 4.0 Development.
Overview of Database Access in.Net Josh Bowen CIS 764-FS2008.
CIS 764 – Presentation Somil Chandwani.  With Microsoft Data Access Components (MDAC), developers can connect to and use data from a wide variety of.
Chapter 8 Binding Data to Web Controls. ASP.NET 2.0, Third Edition2.
ASP.NET Part 3 Instructor: Charles Moen CSCI/CINF 4230.
Advanced Database Management System Lab no. 11. SQL Commands (for MySQL) –Update –Replace –Delete.
ODBC, OLE DB, and ADO Introduction Dr. Ron Eaglin.
1 UCN Technology: Computer Science: Autumn 2012 ADO.NET 2.0 Architecture DataReader DataSet Connection factory Config file.
Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig.
1 ASP.NET ASP.NET Rina Zviel-Girshin Lecture 4. 2 Overview Data Binding Data Providers Data Connection Data Manipulations.
CIS 451: Using ASP.NET Objects with SQL Dr. Ralph D. Westfall February, 2009.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Needs for Accessing Database To make your web site more dynamic and maintainable, you can display information on your web pages that are retrieved from.
Chapter 13 Database Access Using ADO.NET
Databases and Data Access  Introduction to ADO.NET  ADO.NET objects  ADP.NET namespaces  Differences between ADO and ADO.NET.
ASP.NET Presented by Pan Gao. ASP.NET Next generation of ASP Next generation of ASP Program Language to build web application Program Language to build.
 It is the primary data access model for.Net applications  Next version of ADO  Can be divided into two parts ◦ Providers ◦ DataSets  Resides in System.Data.
ASP.NET - accessing the database - datareader vs dataset - datagrid vs datalist - brief look at web matrix.
Objectives In this lesson, you will learn to: *Identify the need for ADO.NET *Identify the features of ADO.NET *Identify the components of the ADO.NET.
Module 9: Accessing Relational Data Using Microsoft Visual Studio.NET.
Session 8: ADO.NET. Overview Overview of ADO.NET What is ADO.NET? Using Namespaces The ADO.NET Object Model What is a DataSet? Accessing Data with ADO.NET.
ASP.NET Database Connection. ASP.NET Framework The ASP.NET framework includes the ADO.NET data access technology for working with databases and other.
1 UCN Technology: Computer Science: Autumn 2012 ADO.NET 2.0 Architecture DataReader DataSet Connection factory Config file.
CIS 375—Web App Dev II ASP.NET 8 More Binding. 2 The Repeater ControlThe Repeater Control 1 The Repeater control is used to display a repeated list of.
1.Net programmingADO.NETNOEA / PQC ADO.NET Architecture Connection factory Config file DataReader DataSet DataGrid Autogeneration of SQL.
Presented by Joseph J. Sarna Jr. JJS Systems, LLC
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
 It is the primary data access model for.Net applications  Next version of ADO  Can be divided into two parts ◦ Providers ◦ DataSets  Resides in System.Data.
ASP.NET Binding and an Introduction to Database Queries Please use speaker notes for additional information!
ASP.NET - insert - delete -update DataTables (disconnected datasets) Shopping Basket.
Why ADO.NET Not your father’s Data Access.
HNDIT Rapid Application Development
Database Connectivity with ASP.NET. 2 Introduction Web pages commonly used to: –Gather information stored on a Web server database Most server-side scripting.
ADO.NET FUNDAMENTALS BEGINNING ASP.NET 3.5 IN C#.
Module 4 Introduction ADO.NET.
1 Database Programming with ADO.NET Kashef Mughal.
CIS 375—Web App Dev II ASP.NET 5 Events. 2 The Page_Load Event The Page_Load event is triggered when a page loads. [Example]Example Sub Page_Load lbl1.Text="The.
Module 2: Using ADO.NET to Access Data. Overview ADO.NET Architecture Creating an Application That Uses ADO.NET to Access Data Changing Database Records.
DATABASE SYSTEM VB LINK TO MS-SQL. 2 Visual ProgrammingChapter 6 Select Project -> Component.
Querying Information in a Database. CONTENTS Relational Database Systems Creating Database with SQL Server Reading Data with LINQ Requirements to Get.
Data Access. ADO.NET ADO.NET is the primary library for building database solutions within the.NET Framework. ADO.NET does not replace ADO. ADO and OLEDB.
.NET Data Access and Manipulation
Data Control In this presentation… –databases supported –inserting a data control –data control properties –using the data control.
C# 1 CSC 298 ADO.NET. C# 2 ADO.NET  A data access technology that maps very well to the world of the web (disconnected architecture)  data is retrieved.
ASP.NET Programming with C# and SQL Server First Edition
Accessing Databases using Ado.net
Introduction to Database Processing with ADO.NET
Introduction to Database Processing with ADO.NET
ADO.NET Framework.
Programming the Web Using ASP.Net
Lecture 6 VB.Net SQL Server.
ADO.NET Accessing Databases in VS.NET
Chapter 23 – ASP.NET Outline 23.1 Introduction NET Overview
Tonga Institute of Higher Education
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Browser (Client Side) 瀏覽器 (客戶端)
Presentation transcript:

CIS 375—Web App Dev II ASP.NET 9 Database

2 ADO.NET What is ADO.NET? ADO.NET is a part of the.NET Framework ADO.NET consists of a set of classes used to handle data access ADO.NET is entirely based on ________ ADO.NET has, unlike ADO, no __________ object With ADO.NET you can work with ___________. We are going to use the Northwind database in our examples.

3 Create a DB Connection First, import the "System.Data.OleDb" namespace. We need this namespace to work with Microsoft Access and other ________ database providers. We will create the connection to the database in the Page_Load subroutine. We create a dbconn variable as a new OleDbConnection class with a connection string which identifies the OLE DB provider and the location of the database. Then we open the database ____________.

4 Sample Code sub Page_Load dim dbconn dbconn=New OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0; data source=" & server.mappath("northwind.mdb")) dbconn.Open() Note: The connection string must be a continuous string without a line break!

5 Create a Database Command To specify the records to retrieve, we will create a dbcomm variable as a new OleDbCommand class. The OleDbCommand class is for issuing SQL _______ against database tables. sql="SELECT * FROM customers" dbcomm=New OleDbCommand(sql,dbconn)

6 Create a DataReader The OleDbDataReader class is used to read a ________ of records from a data source. A DataReader is created by calling the ExecuteReader method of the OleDbCommand object. dbread=dbcomm.ExecuteReader()

7 Bind to a Repeater Control Then we bind the DataReader to a _________ control. customers.DataSource=dbread customers.DataBind() dbread.Close() dbconn.Close() end sub

8 HTML Code That Follows Companyname Contactname Address City