ADO.NET FUNDAMENTALS BEGINNING ASP.NET 3.5 IN C#.

Slides:



Advertisements
Similar presentations
17. Data Access ADO.Net Architecture New Features of ADO.NET
Advertisements

Database Connections with ASP.Net
1 Introducing SQL Server  A Relational DBMS  A Powerful Client/Server DBMS Utilities range from:  Simple Database Creation/Maintenance To  Datawarehousing,
Chapter 10 ADO. What is ADO? ADO is a Microsoft technology ADO stands for ActiveX Data Objects ADO is a programming interface to access data in a database.
Introduction to Database Processing with ADO.NET.
VB.NET Database Access ISYS546. Microsoft Universal Data Access ODBC: Open Database Connectivity –A driver manager –Used for relational databases OLE.
ASP.NET Database Connectivity I. 2 © UW Business School, University of Washington 2004 Outline Database Concepts SQL ASP.NET Database Connectivity.
VB.NET Database Access ISYS 812. Microsoft Universal Data Access ODBC: Open Database Connectivity –A driver manager –Used for relational databases OLE.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
Introduction to ADO.Net, VB.Net Database Tools and Data Binding ISYS 512.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
From VS C# 2010 Programming, John Allwork 1 VS2010 C# Programming - DB intro 1 Topics – Database Relational - linked tables SQL ADO.NET objects Referencing.
Chapter 8 Binding Data to Web Controls. ASP.NET 2.0, Third Edition2.
Chapter 9 Using the SqlDataSource Control. References aspx.
Chapter 11 Introduction to Database Processing. Class 11: Database Processing Use a Visual Studio Wizard to establish a database connection used to load.
Programming with Visual Basic.NET An Object-Oriented Approach  Chapter 8 Introduction to Database Processing.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 512.
ODBC, OLE DB, and ADO Introduction Dr. Ron Eaglin.
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
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.
Developing Web Applications Using Microsoft ® Visual Studio ® 2008.
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.
Databases and Data Access  Introduction to ADO.NET  ADO.NET objects  ADP.NET namespaces  Differences between ADO and ADO.NET.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
1 Introduction to ADO.NET Microsoft ADO.NET 2.0 Step by Step Rebecca M Riordan Microsoft Press, 2006.
 2006 Pearson Education, Inc. All rights reserved Database, SQL and ADO.NET.
Database, SQL, and ADO.NET- Part 1 Session 11 Mata kuliah: M0874 – Programming II Tahun: 2010.
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.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
ASP.NET The Clock Project. The ASP.NET Clock Project The ASP.NET Clock Project is the topic of Chapter 23. By completing the clock project, you will learn.
ASP.NET Rina Zviel-Girshin Lecture 5
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.
Module 7: Accessing Data by Using ADO.NET
ADO.NET Data Access. Page  2 SQL  When we interact with the datasource through ADO.NET we use the SQL language to retrieve,modify,update information.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Introduction to ADO.NET ADO.NET - Lesson 01  Training time: 10 minutes  Author:
Presented by Joseph J. Sarna Jr. JJS Systems, LLC
An Introduction to ADO.Net Marmagna Desai.NET Seminar, Fall-2003.
ADO.NET connections1 Connecting to SQL Server and Oracle.
 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.
1 11/10/05CS360 Windows Programming ADO.NET. 2 11/10/05CS360 Windows Programming ADO.NET  Behind every great application is a database manager o Amazon.
Mauricio Featherman, Ph.D. Washington St. University
Introduction to ADO.Net and VS Database Tools and Data Binding ISYS 350.
ADO.NET AND STORED PROCEDURES - Swetha Kulkarni. RDBMS ADO.NET Provider  SqlClient  OracleClient  OleDb  ODBC  SqlServerCE System.Data.SqlClient.
Module 3: Working with Local Data. Overview Using DataSets Using XML Using SQL Server CE.
1 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 12 DATABASE DESIGN AND DEVELOPMENT: A VISUAL APPROACH Chapter 12 Accessing.
HNDIT Rapid Application Development
C# .NET Software Development
Active Data Objects Using.Net ADO.Net Farooq Ahmed Amna Umber Summayya Shehzad.
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.
Module 10: Data Access in ASP.NET. Overview Overview of the ASP.NET Data Access What is Data Access List of Data Source Control What is Data Bound How.
.NET Data Access and Manipulation
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.
Common SQL keywords. Building and using CASE Tools Data Base with Microsoft SQL-Server and C#
ASP.NET Programming with C# and SQL Server First Edition
Introduction to Database Processing with ADO.NET
ADO.NET Fundamentals.
Introduction to Database Processing with ADO.NET
Unit 9.1 Learning Objectives Data Access in Code
ADO.NET Framework.
PROG Advanced Web Apps 5/23/2018 Notes on ADO.NET (1) Wendi Jollymore, ACES.
© 2016, Mike Murach & Associates, Inc.
Programming the Web Using ASP.Net
Lecture 6 VB.Net SQL Server.
VB.NET Using Database.
Tonga Institute of Higher Education
Chapter 10 ADO.
M S COLLEGE OF ART’S, COMM., SCI. & BMS Advance Web Programming
ADO.NET Fundamentals.
Presentation transcript:

ADO.NET FUNDAMENTALS BEGINNING ASP.NET 3.5 IN C#

WHAT IS ADO.NET ADO.NET is the technology that.NET applications use to interact with database. Data binding is a powerful and practical feature Not easy, must have solid grasp of ADO.NET fundamentals

UNDERSTANDING DATA MANAGEMENT

THE ROLE OF THE DATABASE Adding database to VS2013

ADO.NET BASICS

TWO GROUPS OF CLASSES Contain and manage data DataSet, DataTable, DataRow, and DataRelation Generic Connect to specific data source Connection, Command, and DataReader Data providers

DATA NAMESPACES

DATA PROVIDER CLASSES Data classes can’t accomplish much Data access is needed see table below

DIRECT DATA ACCESS The easiest to connect to the database Steps 1. Create Connection, Command, and DataReader objects. 2. Use the DataReader to retrieve information from the database, and display it in a control on a web form. 3. Close your connection. 4. Send the page to the user. At this point, the information your user sees and the information in the database no longer have any connection, and all the ADO.NET objects have been destroyed. To add or update information, follow these steps: 1. Create new Connection and Command objects. 2. Execute the Command (with the appropriate SQL statement).

NAMESPACES NEEDED using System.Data; using System.Data.SqlClient;

CREATING A CONNECTION SQL Server through the OLE DB provider Using SqlConnection object from the SQL Server

THE CONNECTION STRING Data source – name of the server Initial catalog – name of the database Integrated security – using Windows user account, SSPI (security support provider interface) or SQL server user id and password Connection Timeout – how long your code will wait before generating an error

STORING THE CONNECTION STRING Using a constructor Store in web.config

Import it

GRIDVIEW EXAMPLE WITH MDF FILE

Drag GridView

Bind a data source

Download the file from douap.uap.asia

The name to be added in the web.config

Shows the columns of the database table

Test the connection

Adding/modifying the properties

Adding theme and AutoGenerateEditButton="true"

EXERCISE Add insert to the GridView Add UpdateCommand Add DeleteCommand

PROBLEM SET Modify the order menu to use mdf files and add CRUD