Internet Programming - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Internet Programming

Description:

Server-side Scripting via ASP (Active Server Pages) and ODBC (Open DataBase ... a dynamically created Web page that uses scripting, usually VB Script or Jscript. ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 10
Provided by: alexain
Category:

less

Transcript and Presenter's Notes

Title: Internet Programming


1
Internet Programming
  • Lecture 4

2
Server Side Scripting
  • Active Server Pages

3
Introduction
  • Server-side Scripting via ASP (Active Server
    Pages) and ODBC (Open DataBase Connectivity) make
    such maintenance a much easier task.
  • ASP - specification for a dynamically created Web
    page that uses scripting, usually VB Script or
    Jscript. When a browser requests an ASP page,
    the Web server generates an HTML page and sends
    it back to the browser.

4
ODBC
  • A standard database access method developed by
    Microsoft - makes it possible for any application
    to access any DBMS.
  • It inserts a middle layer, called a database
    driver, between an application and the DBMS to
    translate the application's data queries into
    commands that the DBMS understands. Both the
    application and the DBMS must be ODBC-compliant
    for this to work.

5
Mixing HTML and ASP
  • HTML ASP pages are often used in combination
  • HTML pages providing static text images and
    capturing user input via forms
  • ASP pages are used to deliver more dynamic
    content

6
How does it work?
  • Use an HTML form, on the Client Machine, to call
    an ASP page on a remote Web-server, passing the
    content of variables to that ASP page.
  • The ASP page builds a dynamic Web-page
    incorporating the data passed to it from the
    form.

7
Some ASP code
  • ltbodygt
  • lt
  • Response.write("lthrgt")
  • Response.write("lth2gt")
  • Response.write(Request.Form("first"))
  • Response.write(Request.Form("family")) Response
    .write("lt/h2gt")
  • Response.write("lt/hrgt")
  • gt
  • lt/bodygt

8
ASP with ODBC
  • lt
  • Set MyConnServer.CreateObject("ADODB.Connection
    ")
  • MyConn.Open "alex"
  • Set RsMyConn.Execute("SELECT From
    Customer")
  • WHILE NOT Rs.EOF
  • Response.Write("lttrgt")
  • Response.Write("lttd width'50' valign'top'
    align'left'gt")
  • Response.Write(Rs("CustName"))
  • Response.Write("lt/tdgt")
  • Response.Write("lt/trgt")
  • Rs.MoveNext
  • WEND
  • Rs.Close
  • MyConn.Close
  • gt
  •  

9
End of Lecture 4
Write a Comment
User Comments (0)
About PowerShow.com