Internet Programming ASP 30.06.20101 Sara Shahzad Dept. of Computer Science UOP.

Slides:



Advertisements
Similar presentations
DT211/3 Internet Application Development Active Server Pages & IIS Web server.
Advertisements

Server Side Programming ASP1 Server Side Programming Database Integration Peter O’Grady.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Authenticating Users in an ASP.NET Application. Web Site Administration Tool From VS 2008, click Website/ ASP.Net Configuration to open Web Site Administration.
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.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
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,
DT228/3 Web Development Databases. Database Almost all web application on the net access a database e.g. shopping sites, message boards, search engines.
Robofest 2001 Online Management System Jim Needham MCS 4833/01 Senior Project Dr. Chan-Jin Chung, Ph.D.
4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.
Introduction to ADO.Net, VB.Net Database Tools and Data Binding ISYS 512.
1 Foundations of Software Design Lecture 27: Java Database Programming Marti Hearst Fall 2002.
Active Server Pages Points of Interest Chapters 1-4.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
ODBC Open DataBase Connectivity a standard database access method developed by Microsoft to access data from any application regardless of which database.
IS 4506 Database Connectivity.  Overview Two and Three-Tier C/S Architecture ASP Database Connection ODBC - Connection to DBMS Overview of transaction.
Using Data Active Server Pages Objectives In this chapter, you will: Learn about variables and constants Explore application and session variables Learn.
JDBC Java Database Connectivity. What is an RDBMS? Relational database management system. There are other kinds of DBMS. Access is a GUI on a JET RBDMS.
Analysis of SQL injection prevention using a proxy server By: David Rowe Supervisor: Barry Irwin.
Interacting With Data Databases.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
Advanced Database Management System Lab no. 11. SQL Commands (for MySQL) –Update –Replace –Delete.
ADO Connect Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Chapter 7 PHP Interacts with Ms. Access (Open DataBase Connectivity (ODBC))
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.
1998 PI System Users’ Conference PI on the Web: A Primer for PI Users Omicron Consulting 1998 PI System Users’ Conference.
Installing the SAFARIODBC.EXE For use with Excel May 3, 2002.
© 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 9 Slide 1 IT 390 Business Database Administration Unit 9:
A Memo for the Starting of CS-framework Yulin Tian 1. Install the packages of the CS ; 2. Set the environment variable “DIM_DNS_NODE” ; 3. Register an.
True or False? Programming languages can be used to update databases and communicate with other systems. True.
Database 20/2/12 Connection. 
1 Tutorial 2 ABC Web site. Objective Learning web applications design Conducting assumed business logic online Connecting the Database with the web pages.
Server Side Programming ASP1 Server Side Programming Database Integration (cont.) Internet Systems Design.
Web Design and Development for E-Business By Jensen J. Zhao Copyright 2003 Prentice Hall, Inc. Web Design and Development for E-Business Jensen J. Zhao.
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.
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
Department of Computer Science 1 Web/Database Integration with Active Server Pages 17 May 2000 Seree Chinodom Computer Science Department.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
VB and C# Programming Basics. Overview Basic operations String processing Date processing Control structures Functions and subroutines.
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.
1 Chapter Overview Performing Configuration Tasks Setting Up Additional Features Performing Maintenance Tasks.
Chapter 8 Working With Databases in ASP.NET. Listing 8.1 – ShowListControls Uses The SqlDataSource control for estabishing database connectivity and.
How to Connect to Database ODBC (Open Database Connectivity) ADO (ActiveX Data Object) ASP Code To Connect to Database Recordset Object Navigating through.
Swiss Federal Institute of Technology 1 Active Server Pages (ASP) n The simplest example: Additionally ASP may contain code (scripts, ActiveX controls)
Packaging for Voracity Solutions Control Panel David Turner.
Introduction to ADO.Net and VS Database Tools and Data Binding ISYS 350.
Presentation On How To Create Connection To A Database.
ASP.NET Binding and an Introduction to Database Queries Please use speaker notes for additional information!
AVCE ICT – Unit 7 - Programming Session 16 – Database and VB.
1 Web/Database Integration with Active Server Pages 15th/16th October 1998 Nick Gould Faculty of Economic and Social.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
Implementing and Using the SIRWEB Interface Setup of the CGI script and web procfile Connecting to your database using HTML Retrieving data using the CGI.
ASP-12-1 Data Store Access Colorado Technical University IT420 Tim Peterson.
Server Side Programming ASP1 Server Side Programming.
WEB SERVER SOFTWARE FEATURE SETS
INT213 INT213 – Managing Windows with VBScript VBScript Variables ASP State Management.
Labtest.ASP Notes. INSERT STATUS INSERT STATUS
ASP-13-1 Recordsets Colorado Technical University IT420 Tim Peterson.
Windows 2000/ XP Overview Norman White Stern School of Business.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
Using databases ActiveX Data Objects (ADO) Connecting to a database Reading data from a database Inserting, updating and deleting records Using databases.
1 c6212 Advanced Database and Client Server MS SQL Server 2000 Stored Procedures and Parameters What ? Why ? How ?
Server Side Programming Database Integration
Data Virtualization Demoette… ODBC Clients
Introduction to Dynamic Web Programming
JDBC Database Management Database connectivity
Principles of report writing
PHP-language, database-programming
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Presentation transcript:

Internet Programming ASP Sara Shahzad Dept. of Computer Science UOP

ASP Database Connection ASP can be used to connect to Microsoft Access or SQL Server database. An ASP script can contain Structured query language (SQL) statements like insert, delete and update. For example: SELECT * FROM myTable WHERE myValue = 'myValue' INSERT INTO myTable (value1) VALUES ("myValue") Sara Shahzad Dept. of Computer Science UOP 2

ASP database Connection A database connection is done via a connection string in the ASP source code. two ways – using a data source name (DSN) – using a DSN-Less connection string, which can use either the Server.MapPath method or physical pathname to locate the database Sara Shahzad Dept. of Computer Science UOP 3

using a data source name (DSN) example connection string using a DSN: <% dim strConnection, dbase # 'Create string with the name of the data source strConnection = "MyDSN" Set dbase = Server.CreateObject("ADODB.Connection") 'Open database dbase.Open strConnection, "user", "password" %> Sara Shahzad Dept. of Computer Science UOP 4

Configuring the connection DSN's are created using the ODBC data source administrator. This can be found in your system32 folder or within control panel. When you set up a data source name you are required to input the data source name, plus the database that it connects to and the path of that database. A user ID and password are also necessary, which is what will be within the two "", "" parameters in the dbase.Open line Sara Shahzad Dept. of Computer Science UOP 5

DSN-less connection <% DIM objConn Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("/mydatabase.mdb") & ";“ ` ConnectionString and Server.MapPath should be on the same line objConn.Open %> Server.MapPath maps the path back to web server root that the pages are running on, via the directory you have specified Sara Shahzad Dept. of Computer Science UOP 6

VBScript Class example (vbclass.html) Option Explicit Class student private name public property let firstname(fn) name=fn end property Sara Shahzad Dept. of Computer Science UOP 7

public property get firstname() firstname=name end property public function ToString() toString=name end function end class Sara Shahzad Dept. of Computer Science UOP 8

Sub cmdButton_OnClick() Dim s, s1 ' declare object reference Set s = New student ' instantiate person object With s.firstname = Document.Forms(0).txtBox1.Value Call MsgBox(.ToString( )) End With End Sub Sara Shahzad Dept. of Computer Science UOP 9

Enter first name Sara Shahzad Dept. of Computer Science UOP 10