Programming the Web Using ASP.Net

Slides:



Advertisements
Similar presentations
ADO.NET: Working in Disconnected Environment Sergey Baidachni MCT, MCSD, MCDBA.
Advertisements

Direct Data Access, Data Binding. Content Direct Data Access Data Binding Muzaffer DOĞAN - Anadolu University2.
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.
DotNet Market Web Site “EMarket” Milena Natanov Project Supervisor: Victor Kulikov Lab Chief Engineer: Dr. Ilana David Semester spring, – Project.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 12 Database Connectivity with ASP.NET JavaScript, Third Edition.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Chapter 9 Using the SqlDataSource Control. References aspx.
Programming with Visual Basic.NET An Object-Oriented Approach  Chapter 8 Introduction to Database Processing.
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.
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.
Databases and Data Access  Introduction to ADO.NET  ADO.NET objects  ADP.NET namespaces  Differences between ADO and ADO.NET.
1 Introduction to ADO.NET Microsoft ADO.NET 2.0 Step by Step Rebecca M Riordan Microsoft Press, 2006.
 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.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with Disconnected Data The DataSet and SqlDataAdapter ADO.NET - Lesson.
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.
10/26/20151 Chapter 3 Introduction to ADO.NET In this chapter, you will: Learn the basic classes in ADO.NET and its architecture Learn the different 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.
Module 7: Accessing Data by Using ADO.NET
Christopher M. Pascucci.NET Programming: Databases & ADO.NET.
© 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:
ADO.NET Part 2. Slide 2 Overview Slide 3 Introduction to the DataGridView Control It’s a two-dimensional grid containing rows and columns Its use in.
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.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
Mauricio Featherman, Ph.D. Washington St. University
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 25.1 Test-Driving the ATM Application 25.2.
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.
C# .NET Software Development
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 The SqlCommand Object ADO.NET - Lesson 03  Training time: 15 minutes  Author:
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.
ADO .NET from. ADO .NET from “ADO .Net” Evolution/History of ADO.NET MICROSOFT .NET “ADO .Net” Evolution/History of ADO.NET History: Most applications.
.NET Data Access and Manipulation
Validation Controls Assist your users with providing the correct type of input for your application Assist your users with providing the correct type of.
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 ADO.NET
Introduction to Database Processing with ADO.NET
Introduction to Database Processing with ADO.NET
ADO.NET Framework.
© 2016, Mike Murach & Associates, Inc.
How to Create Login Form using vb.net and SqlServer Database
Lecture 6 VB.Net SQL Server.
Active Data Objects Binding ASP.NET Controls to Data
ADO.NET Accessing Databases in VS.NET
VB.NET Using Database.
Tonga Institute of Higher Education
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Database Objects 1/12/2019 See scm-intranet.
Chapter 10 ADO.
PROG Advanced Web Apps 4/13/2019 Programming Data Pages Wendi Jollymore, ACES.
Active Data Objects Binding ASP.NET Controls to Data
M S COLLEGE OF ART’S, COMM., SCI. & BMS Advance Web Programming
Introduction to ADO.Net and Visual Studio Database Tools.
Presentation transcript:

Programming the Web Using ASP.Net Chapter 8: Introduction to ADO.Net Dave Mercer McGraw-Hill/Irwin

Objectives Explain how ADO.Net and ASP.Net are related Describe the major ADO.Net structures and objects Make a connection to a SQL Server database from an ASP.Net application Retrieve records from a SQL server database Bind records to ASP.Net Web Server controls Build a registration and login process for a Web application Build a Web application that supports multi-player games

ADO.Net and Databases ADO.Net is Microsoft’s latest iteration of Active Data Objects, a class from which objects can be derived that are highly useful in making database connection, running database commands, and retrieving records as results. Basically, ADO.Net is a set of objects you can call from your ASP.Net application that allows you to retrieve and manipulate records from a data store, such as SQL Server.

Data Providers Data in databases can be located on any accessible server, not just the local machine. To reach the data, retrieve it and manipulate it, you use a data provider.

ADO.Net Classes Like ASP.Net, ADO.Net is a set of classes from which objects can be derived. The classes include such things as DataAdapters, DataReaders, DataSets, and DataTables. The objects derived from these classes are optimized for retrieving and manipulating records with context and structure very similar to the database from which they are pulled.

Making Database Connections ADO.Net Connection objects allow you to make a connection to a database in your Web application. Connections are made with connection strings, short strings of name/value pairs that identify the database file, location, username and password, and other necessary data. There are two types of Connection objects available: the SQLConnection (for SQL Server 7.0 or higher) and the OleDbConnection.

The SQLConnection Object The SQLConnection object is useful for making connections to SQL Server databases. It uses a connection string to connect to the database file. Once it makes the connection, commands can be executed programmatically against the database file, in much the same way that you might manually retrieve or change records using Enterprise Manager.

SQLConnection Class Properties Important properties of the SQLConnection class include: ConnectionString: The data to be used to make a connection ConnectionTimeout: The length of time to try to make the connection State: Whether the connection is currently open or closed

SQLConnection Class Methods Important methods of the SQLConnection class include: Open: Opens the connection Close: Closes the connection Dispose: Releases the resources used by the connection

Running Database Commands Once a connection has been made, you can run commands against the database. Commands include SELECT, INSERT, UPDATE, and DELETE. The SQLCommand (for SQL server 7.0 or higher) and OleDbCommand objects are used to run commands, and are available in the Toolbox as well.

Running Database Commands (2) There are several types of Execute method available with the SQLCommand object: ExecuteReader ExecuteScalar ExecuteNonQuery, and ExecuteXMLReader

The DataAdapter The DataAdapter object lets you retrieve the entire structure of a database and manipulate it locally, and then update the remote database. The DataAdapter uses Connection and Command objects to make a connection, retrieve, and manipulate records.

DataAdapter and DataSet The DataAdapter object can be used to retrieve records and place them in a DataSet. The DataSet is a high-level object that acts like an entire database represented as an object with collections of child objects for tables, relations, rows, and columns. When you use a DataAdapter to fill a DataSet, you then have the capability to work with records from the database as though you were directly manipulating the database.

ASP.Net Web Application Validation Controls There are two ways you can perform validation: on the client and on the server. Both validation methods can be useful. While client-based validation is handy, it can easily be defeated by sophisticated users. Server-based validation is a backup to client-based validation and is not easy to circumvent. VS.Net has several controls available for validation functions.

Validation Controls in VS.Net Built-in validation controls appear in the Web Server controls portion of the Toolbox when you are working on a Web form: the RequiredFieldValidator the CompareValidator the RangeValidator the RegularExpressionValidator the CustomValidator, and the ValidationSummary. If invalid values are present, the user receives your specified message immediately.

Regular Expressions While a validation control cannot ensure accurate data, you can use the RegularExpressionValidator to ensure that the data matches a pattern that is consistent with the type of data you expect to be entered. You’ll find a number of regular expression patterns already available in VS.Net.

The End