Swiss Federal Institute of Technology 1 Active Server Pages (ASP) n The simplest example: Additionally ASP may contain code (scripts, ActiveX controls)

Slides:



Advertisements
Similar presentations
Developing Database-resident Help for Customizable Web-based Applications Scott DeLoach.
Advertisements

PHP SQL. Connection code:- mysql_connect("server", "username", "password"); Connect to the Database Server with the authorised user and password. Eg $connect.
Query Methods (SQL). What is SQL A programming language for databases. SQL (structured Query Language) It allows you add, edit, delete and run queries.
PHP and MySQL Database. Connecting to MySQL Note: you need to make sure that you have MySQL software properly installed on your computer before you attempt.
1Key – Report Creation with DB2. DB2 Databases Create Domain for DB2 Test Demo.
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
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.
What is it? –Large Web sites that support commercial use cannot be written by hand What you’re going to learn –How a Web server and a database can be used.
Flash Database Access Passing Variables to Flash and Storing Flash Interaction Results in an Access Database.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall COS 346 Day 23.
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.
4/8/99 C. Edward Chow Page 1 Active Server Page It is a server-side scripting environment for creating dynamic content. ASP are files with.asp extension,
Database Connectivity Session 2. Topics Covered ADO Object Model Database Connection Retrieving Records Creating HTML Documents on-the-fly.
Multiple Tiers in Action
Active Server Pages Chapter 1. Introduction Understand how browsers and servers interacted when the Web was young Understand what early Internet and intranet.
Apache Tomcat Server Typical html Request/Response cycle
Robofest 2001 Online Management System Jim Needham MCS 4833/01 Senior Project Dr. Chan-Jin Chung, Ph.D.
Client State Management & Application Security  Client State Management  Concept  ASP Examples  Application Security  Database Based Approach 
14 1 Chapter 14 Database Connectivity and Web Development Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
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.
MSSQL & ASP. Client-Server Relationship Client-Server Relationship HTML Basics HTML Basics Scripting Basics Scripting Basics Examples Examples.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 24 How Websites Work with Databases How Websites Work with Databases.
FrontPage 2000 Web Page Database Connectivity. Client /Server Architecture Database Server PCs Middleware.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
3/8/00asp00 1 Active Server Pages from Microsoft Nancy McCracken Northeast Parallel Architectures Center at Syracuse.
Database 20/2/12 Connection. 
Server Side Programming ASP1 Server Side Programming Database Integration (cont.) Internet Systems Design.
CIS 375—Web App Dev II ASP II. 2 ASP Session: Introduction The Session _______ is used to store information about, or change settings for a user session.
Elements of ASP Documents Adapted from MCDN Web Workshop ( and Webmonkey’s Introduction to Active.
ASP The Global.asa file Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
Putting it all together Dynamic Data Base Access Norman White Stern School of Business.
Introduction to ADO Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Internet Programming ASP Sara Shahzad Dept. of Computer Science UOP.
How to Connect to Database ODBC (Open Database Connectivity) ADO (ActiveX Data Object) ASP Code To Connect to Database Recordset Object Navigating through.
Programming in R SQL in R. Running SQL in R In this session I will show you how to: Run basic SQL commands within R.
Swiss Federal Institute of Technology 1 Models for DB Connectivity n simple HTML for client, adjustable complexity for middleware limited SW power logic.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
Lecture Note 8: ASP Including Files and The Global.asa file.
Lecture Note 7: Sessions and Applications Object.
AVCE ICT – Unit 7 - Programming Session 16 – Database and VB.
ASP-12-1 Data Store Access Colorado Technical University IT420 Tim Peterson.
Maintaining State in ASP. Problem - How do I maintain state information about the user  Several Methods –Cookies –Session variables –Hidden fields 
How Web Database Architectures Work CPS181s April 8, 2003.
Application Object Controlling the Application Application Object Controlling the Application.
Display Page (HTML/CSS)
SQL Query Analyzer. Graphical tool that allows you to:  Create queries and other SQL scripts and execute them against SQL Server databases. (Query window)
7-1 Active Server and ADO Colorado Technical University IT420 Tim Peterson.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
Using databases ActiveX Data Objects (ADO) Connecting to a database Reading data from a database Inserting, updating and deleting records Using databases.
PHP and SQL Server: Connection IST 210: Organization of Data IST2101.
How To Start a SQL server Connecting to SQL Server.
ASP – Web Programming Class  Ravi Anand. ASP – Active Server Pages What is ASP? - Microsoft Technology - Can Run using IIS/PWS/Others - Helps us create.
Section 6.3 Server-side Scripting
Y.-H. Chen International College Ming-Chuan University Fall, 2004
Active Server Pages Computer Science 40S.
PHP / MySQL Introduction
ISC440: Web Programming 2 Server-side Scripting PHP 3
ASP.
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Database Connectivity and Web Development
Database Connections.
Cookies A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer.
Graduation Project #1 University Internet Student Registration System
Presentation transcript:

Swiss Federal Institute of Technology 1 Active Server Pages (ASP) n The simplest example: Additionally ASP may contain code (scripts, ActiveX controls) within which is interpreted by the server. Hello World ! Connect to a database (DB)  Line ASP: Simplest Example run example:

n 1. instantiate a server Object for an ADO-DB connection Active Server Pages (ASP) Connection to a database (DB): <% Set objConn = Server.CreateObject("ADODB.Connection") 2. open the connection to the DSN (data source name) objConn.Open "IGT-DB" 5. close connection 3. issue an SQL command and get results 4. display the results Set objList = objConn.Execute("SELECT * FROM TPersons") Do while not objList.EOF %> <% objList.MoveNext Loop objList.Close objConn.Close %> ASP objects and Management  ASP: Connection to a DB run example:

Swiss Federal Institute of Technology 3 ASP Session Management n Browser calls 1st ASP Start Session, i.e Run ASP end Session, i.e. New Application ? Start Application, i.e. y n create Application object fire Application_OnStart and scan Global.asa create Session object create Request object fire Session_OnStart and scan Global.asa fire Session_OnEnd ASP: Session Management

Swiss Federal Institute of Technology 4 ASP Session Management n Built in ASP objects ( ASP: Built in Objects

Swiss Federal Institute of Technology 5 Active Server Pages (ASP) n Query a DB from a Form 1st Names to search for: A simple Form: QUERY.ASP is called with parameter FirstName ASP: Query a DB from a Form run example:

Swiss Federal Institute of Technology 6 1. get parameter from form (Request object) Active Server Pages (ASP) n 2. add a WHERE clause with this parameter <% Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open "IGT-DB" Query a DB from a Form FName = Request("FirstName") Set objList = objConn.Execute( SQLQuery ) Do while not objList.EOF %> <% objList.MoveNext Loop objList.Close objConn.Close %> SQLQuery = "SELECT * FROM Tpersons" "WHERE TPersons.PerFirstName='" & FName & "'" + _ ASP: Display query Results run example: