ASP-14-1 Advanced ASP Techniques Colorado Technical University IT420 Tim Peterson.

Slides:



Advertisements
Similar presentations
Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
Advertisements

SOAP.
4.01 How Web Pages Work.
1 Chapter 12 Working With Access 2000 on the Internet.
Session 6 Server-side programming - ASP. An ASP page is an HTML page interspersed with server-side code. The.ASP extension instead of.HTM denotes server-side.
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 COS 346 Day 23.
CVEV 118/698 Active Server Pages Lecture 3 Prof. Mounir Mabsout Elsa Sulukdjian Walid El Asmar.
1 Active Server Pages Active Server Pages (ASPs) are Web pages ASP = server-side scripts + HTML The appearance of an Active Server Page depends on who.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
SQL Server 2000 and XML Erik Veerman Consultant Intellinet Business Intelligence.
FTP File Transfer Protocol. Introduction transfer file to/from remote host client/server model  client: side that initiates transfer (either to/from.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
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.
Configuration Management and Server Administration Mohan Bang Endeca Server.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
© 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 9 Slide 1 IT 390 Business Database Administration Unit 9:
3/8/00asp00 1 Active Server Pages from Microsoft Nancy McCracken Northeast Parallel Architectures Center at Syracuse.
Server Side Programming ASP1 Server Side Programming Database Integration (cont.) Internet Systems Design.
9/15/2015© 2008 Raymond P. Jefferis IIILect Application Layer.
1 Chapter 2 & Chapter 4 §Browsers. 2 Terms §Software §Program §Application.
JavaScript, Fourth Edition
Using Visual Basic 6.0 to Create Web-Based Database Applications
Posting XML Data From the Client to a Server Eugenia Fernandez IUPUI.
Elements of ASP Documents Adapted from MCDN Web Workshop ( and Webmonkey’s Introduction to Active.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 23 How Web Host Servers Work.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
MySQL Databases & PHP Integration Using PHP to write data to, and retrieve data from, a MySQL database.
ADO 2.5 Kamaljit Bath, Program Manager Data Access Group.
Using Client-Side Scripts to Enhance Web Applications 1.
2-1 WEB DATABSE INTERFACING Colorado Technical University IT420.
Introduction to ADO Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Website Development with PHP and MySQL Saving Data.
CSC 2720 Building Web Applications FLEX –Working with Remote Data.
Cookies Web Browser and Server use HTTP protocol to communicate and HTTP is a stateless protocol. But for a commercial website it is required to maintain.
What’s new in ADO 2.5 Greg Hinkel Program Manager Data Access Group
What is database?  Any Method for access info into Application from DataBase?  ODBC is standard for Accessing Data.  Problem with ODBC:  Information.
USING XML AS A DATA SOURCE. Data binding is a process by which information in a data source is stored as an object in computer memory. In this presentation,
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
Appendix E: Overview of HTTP ©SoftMoore ConsultingSlide 1.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
ASP-12-1 Data Store Access Colorado Technical University IT420 Tim Peterson.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
WEB SERVER SOFTWARE FEATURE SETS
What’s new in ADO 2.5 Greg Hinkel Program Manager Data Access Group
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
What’s new in ADO 2.5 Greg Hinkel Program Manager Data Access Group
Source = Table rsObject.Open tablename, Connection Object, CursorType, LockType, adCmdTable Source = Stored Procedure rsObject.Open stored procedure name,
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.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
Using databases ActiveX Data Objects (ADO) Connecting to a database Reading data from a database Inserting, updating and deleting records Using databases.
ASP.NET Programming with C# and SQL Server First Edition
CS 330 Class 7 Comments on Exam Programming plan for today:
OUTLINE Basic ideas of traditional retrieval systems
The Request & Response object
JavaScript & jQuery AJAX.
Chapter 10 ADO.
What’s new in ADO Greg Hinkel Program Manager Data Access Group
PHP Forms and Databases.
Presentation transcript:

ASP-14-1 Advanced ASP Techniques Colorado Technical University IT420 Tim Peterson

ASP-14-2 Command Object ADO provides the Command object which is specifically designed to run commands against a data store. Creation of the Command object is as follows: Set objCommand = Server.CreateObject(“ADODB.Command”)

ASP-14-3 Command Object Execution To execute a command, we use it’s execute method: objCommand.Execute RecordsAffected, Parameters, Options RecordsAffected - This parameter is for action queries. Parameters - Holds an array of parameters passed to the command. Options - similar to the options parameter we used for the recordset object. Defines the type of command being run.

ASP-14-4 Parameter creation Parameter creation syntax is: Set objRS = objComm.CreateParameter(Name, Type, Direction, Size, Value) Name - Specifies the name of the parameter Type - Defines the data type of the parameter. Direction - Parameters can either be used to send or return data. Size - Specifies that maximum length of the parameter in length of char string of bytes. Value - Can be used to initialize the parameter (constant).

ASP-14-5 Specifying Parameter Properties Set objParam = objComm.CreateParameter objParam.Name = “Director” objParam.Type = adVarChar objParam.Size = 50 objParam.Direction = adInput objParam.Value = “Time for beer”

ASP-14-6 Distributed Author Versioning IIS 5.0 is referred to as WEBDAV and uses extensions of HTTP 1.1 protocol. Allows client software to manipulate server files. WEBDAV then allows for distributed authoring of documents on the Web. WEBDAV can also be used for s or any other form of data store for which there is an OLE-DB provider.

ASP-14-7 WEBDAV Objects WEBDAV provides two additional objects that come with ADO 2.5 –Record Object - used to represent a record in a recordset. –Stream Object - represents data in either binary or plain text.

ASP-14-8 Semi-Structured Data NODE CHILDREN

ASP-14-9 Viewing Record Properties Retrieving Semi-structured Data <% Dim objNodeRecord, objNodeField Set objNodeRecord = Server.CreateObject("ADODB.Record") objNodeRecord.Open "","URL= Response.Write " Properties of the folder: " Response.Write " " For Each objNodeField in objNodeRecord.Fields Response.Write " " & _ " " & objNodeField.Name & " " & _ " " & objNodeField.Value & " " & _ " " Next Response.Write " " objNodeRecord.Close Set objNodeRecord = Nothing %>

ASP Record Object Methods There are three methods that can be used: –CopyRecord objRecord.Open “File.txt”, “URL= objRecord.CopyRecord “ “, “ –MoveRecord objRecord.Open “File.txt”, “URL= objRecord.MoveRecord “ “, “ –DeleteRecord objRecord.Open “File.txt”, “URL= objRecord.DeleteRecord

ASP Stream Object This object allows us to access data contained within the Record object. To create a stream object: Set objStream = Server.CreateObject(“ADODB.Stream”) Open Method for the Stream object is as follows: objStream.Open Source, ModeofAccess, OpenOptions, UserId, Password

ASP Stream Object Parameters Source - URL of the file we want to access ModeofAccess - adModeRead (read only) or adModeReadWrite (read/write access) OpenOptions - specifies where we are getting the data from –adOpenStreamFromURL - Get data from a URL source. –adOpenStreamFromRecord - Get data from an existing Record object.

ASP Stream Object - Additional Methods ReadText Method: objStream.Charset = “Ascii” Response.Write (objStream.ReadText) WriteText Method: objStream.Position = 0 strText “This is the last slide. Now write in the stream” objStream.WriteText(strText)