DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall COS 346 Day 23.

Slides:



Advertisements
Similar presentations
Chapter 13 © 2000 Prentice Hall Chapter 13 Accessing the Database Server: ODBC, OLE DB, and ADO David M. Kroenke Database Processing © 2000 Prentice Hall.
Advertisements

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 346 Day 24.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 9-1 COS 346 Day 20.
Database Processing Applications and Business Intelligence Chapter Seven DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
1 Chapter 12 Working With Access 2000 on the Internet.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 346 Day 25.
Fundamentals, Design, and Implementation, 9/e Chapter 12 ODBC, OLE DB, ADO, and ASP.
Prentice Hall © COS 346 Day Agenda Capstone Progress report due Assignment 9 not corrected yet Assignment 10 posted (last one!!!) –Due.
The ADO Data Control. Universal Data Access Open Database Connectivity (ODBC) –standard for accessing data in databases OLE-DB –allows access to data.
Using Visual Basic 6.0 to Create Web-Based Database Applications
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 COS 346 Day 11.
Prentice Hall © COS 346 Day Agenda Questions? Assignment 7 Corrected –4 A’s and 4 B’s Assignment 8 posted –Due April 6 Quiz 2 next class.
Fundamentals, Design, and Implementation, 9/e COS 346 DAY 22.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 10.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall COS 346 Day 26.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 236 Day 24.
Getting Started (Excerpts) Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 8-1 COS 346 Day 17.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 8-1 COS 346 Day 18.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 COS 346 Day 22.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 COS 346 Day 11.
CIS 451: ASP Recordsets Dr. Ralph D. Westfall May, 2002.
Database Processing Applications Chapter Seven DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
Database Processing Applications Chapter Seven DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Getting Started with Microsoft SQL Server 2012 Express Edition Appendix A DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Getting Started with Web Servers, PHP, and the Eclipse PDT Appendix I DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 1-1 David M. Kroenke’s Database Processing: Fundamentals, Design, and.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 COS 236 Day 22.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 David M. Kroenke’s Chapter Twelve: ODBC Database Processing: Fundamentals,
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 David M. Kroenke’s Chapter Twelve: ODBC, OLE DB, ADO, and ASP Part.
1 ODBC, OLE DB, ADO, and ASP. 2 Introduction  Because database applications today reside in a complicated environment, various standards have been developed.
© 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 9 Slide 1 IT 390 Business Database Administration Unit 9:
Server Side Programming ASP1 Server Side Programming Database Integration (cont.) Internet Systems Design.
David M. Kroenke’s Chapter One: Introduction Part Two Database Processing: Fundamentals, Design, and Implementation.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
ADO 2.5 Kamaljit Bath, Program Manager Data Access Group.
Chapter 15 Relational Implementation with DB2 David M. Kroenke Database Processing © 2000 Prentice Hall.
Advanced Topics Chapter Seven DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-1 David M. Kroenke’s Chapter Eleven: Managing Databases with SQL Server.
Lecture Note 10: Simple Database Techniques. Introduction –Database System –Access, SQL Server and others. –Microsoft Access - Interacting with this databases.
Visual Basic ADO Programming 56:150 Information System Design.
What is database?  Any Method for access info into Application from DataBase?  ODBC is standard for Accessing Data.  Problem with ODBC:  Information.
How to Connect to Database ODBC (Open Database Connectivity) ADO (ActiveX Data Object) ASP Code To Connect to Database Recordset Object Navigating through.
3-Tier Client/Server Internet Example. TIER 1 - User interface and navigation Labeled Tier 1 in the following graphic, this layer comprises the entire.
ActiveX Data Objects (ADO) is Microsoft’s latest database object model. The goal of ADO is to allow VB developers to use a standard set of objects to refer.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 David M. Kroenke’s Chapter Twelve: ODBC, OLE DB, ADO, and ASP Part.
+ Connecting to the Web Chapter 7. + Chapter Objectives Understand and be able to set up Web database processing Learn the basic concepts of Extensible.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Introduction Because database applications today reside in a complicated environment, various standards have been developed for accessing database servers.
7-1 Active Server and ADO Colorado Technical University IT420 Tim Peterson.
ASP-13-1 Recordsets Colorado Technical University IT420 Tim Peterson.
1 ADO Activex Data Objects. 2 ADO ADO allows users to access data easily from many existing databases (such as Access or Paradox) From ODBC compliant.
ADO & Recordsets. ADO Description & History  ActiveX Data Objects  History  1991 ODBC  Data Access Objects (DAO) for VB developers (JET)  Remote.
Using databases ActiveX Data Objects (ADO) Connecting to a database Reading data from a database Inserting, updating and deleting records Using databases.
Database Processing Applications Chapter Seven DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 7 th Edition.
Database Processing Applications and Business Intelligence
ASP.NET Programming with C# and SQL Server First Edition
ActiveX Data Objects (ADO)
INT213 Updating the Database.
Database Processing Applications
Database Processing: David M. Kroenke’s Chapter Seven:
Chapter 7 Using SQL in Applications
Database Processing: David M. Kroenke’s Chapter Twelve: Part One
Presentation transcript:

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall COS 346 Day 23

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Agenda Questions? Quiz 3 is Today –DP Chap 9 & 11, SQL Chap 11 Quiz 4 is on May 4 –DP Chap 12 – 15 –Password is “ConCurrency” Next Capstone progress report Due April 24 Assignment 9 is posted –Due April 24 –More detailed instructions on have been provided Capstones projects and presentations are due May 12 at 10AM Today we will be discussing ADO and ASP

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall David M. Kroenke’s Chapter Twelve: ODBC, OLE DB, ADO, and ASP Part Two Database Processing: Fundamentals, Design, and Implementation

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Active Data Objects (ADO) Active Data Objects (ADO) characteristics: –A simple object model for OLE DB data consumers –It can be used from VBScript, JScript, Visual Basic, Java, C#, C++ –It is a single Microsoft data access standard –Data access objects are the same for all types of OLE DB data

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Invoking ADO from Active Server Pages In Microsoft’s Active Server Pages (ASP) are Web pages where: –Statements are enclosed within the characters.and processes on the WEB Server –ASP statements are processed on the Web server. (not all) –Other (HTML) statements are processed by the client Web browser.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall The ADO Object Model

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Connection Object A connection object establishes a connection to a data provider and data source. –Connections have an isolation mode. Once a connection is created, it can be used to create RecordSet and Command objects.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall RecordSet Objects RecordSet objects represent cursors: –They have both CursorType and LockType properties. –RecordSets can be created with SQL statements. –The Fields collection of a RecordSet can be processed to individually manipulate fields. –The Errors collection contains one or more error messages that result from an ADO operation.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Command Object The command object is used to execute stored parameterized queries or stored procedures: –Input data can be sent to the correct ASP using the HTML FORM tag. –Table updates are made using the RecordSet Update method.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall ADO Constants: Isolation Levels

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall ADO Constants: Cursor Levels

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall ADO Constants: Lock Types

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Connection Object: ASP Code <% Dim objConn Set objConn = Server.CreateObject (“ADODB.connection”) objConn.IsolationLevel = adXactReadCommitted ‘ use ADOVBS objConn.Open “ViewRidgeSS”, %> <% objConn.Open “DSN=ViewRidgeOracle2;UID=DK1;PWD=Sesame” %>

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall RecordSet Object: ASP Code <% Dim objRecordSet, varSql varSQL = “SELECT * FROM ARTIST” Set objRecordSet = Server.CreateObject(“ADODB.Recordset”) objRecordSet.CursorTye = adOpenStatic objRecordSet.LockType = adLockReadOnly objRecordSet.Open varSQL, objConn %>

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Fields Collection: ASP Code <% Dim varI, varNumCols, objField varNumCols = objRecordSet.Fields.Count For varI = 0 to varNumCols - 1 Set objField = objRecordSet.Fields(varI) ‘ objField.Name now has the name of the field ‘ objField.Value now has the value of the field ‘ can do something with them here Next >%

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Errors Collection: ASP Code <% Dim varI, varErrorCount, objError On Error Resume Next varErrorCount = objConn.Errors.Count If varErrorCount > 0 Then For varI = 0 to varErrorCount - 1 Set objError = objConn.Errors(varI) ‘ objError.Description contains ‘ a description of the error Next End If >%

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Command Object: ASP Code <% Dim objCommand, objParam, objRs ‘Create the Command object, connect it to objConn and set its format Set objCommand = Server.CreateObject(“ADODB.command”) Set objCommand.ActiveConnection = objConn objCommand.CommandText=“{call FindArtist (?)}” ‘Set up the parameter with the necessary value Set objParam = objCommand.CreateParameter (“Nationality”, adChar, adParamInput, 25) objCommand.Parameters.Append objParam objParam.Value = “Spanish” ‘Fire the Stored Proc Set objRs = objCommand.Execute >%

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall ADO Example: Reading a Table Artist.asp artist.asp

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall ADO Example: Reading a Table The Artist.asp Results

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Read the customer table results from Figure using MSSQL instead of Oracleresults from Figure Steps –Create SQL Login for the ASP page and the OBDC connector Set the right permissions to the right objects –Create OBDC connector –Create web directory on your desktop Copy the “adovbs.inc” file to the directory Modify and place the *.asp file in the directory –Run the page the local web server. –Provide a screen dump to show that you did accomplish the objective before and after deleting two rows (delete the last two rows)

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall David M. Kroenke’s Database Processing Fundamentals, Design, and Implementation (10 th Edition) End of Presentation: Chapter Twelve Part Two