ASP and Database Connectivity - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

ASP and Database Connectivity

Description:

Creating an ASP Page database connection. You do need: Visual Basic ... to begin the Vb Script % to begin the Vb Script. Kevin Murphy. Step 1: The variables ... – PowerPoint PPT presentation

Number of Views:108
Avg rating:3.0/5.0
Slides: 10
Provided by: Katherin6
Category:

less

Transcript and Presenter's Notes

Title: ASP and Database Connectivity


1
ASP and Database Connectivity
  • Masters Project CS 490

2
Creating an ASP Page database connection
  • You do need
  • Visual Basic scripting knowledge
  • a basic text editor
  • lt to begin the Vb Script
  • gt to begin the Vb Script

3
Step 1 The variables
  • lt
  • Dim sql
  • Dim oRS
  • Dim oConn, sConnString

4
Step 2 The connection type
  • Set oConn Server.CreateObject("ADODB.Connection"
    )

5
Step 3 The driver used
  • sConnString "DRIVERMicrosoft Access Driver
    (.mdb)" _
  • "DBQ" Server.MapPath("\murf\db\neiu.mdb")
    ""

6
Step 4 Open the connection
  • oConn.Open(sConnString)

7
Step 4 SQL select
  • sql "select Course, Grade, Semester, Year from
    Classes"

8
Step 4 execute the connection
  • Set oRS oConn.Execute(sql)
  • gt

9
Comments
  • Use the internet for resources, there are many
    sites for examples.
  • Draw a plan of your database on paper before you
    begin.
  • Make backups of pages prior to changes.
  • Once a working example exists, use it as a
    starting point for other pages.
Write a Comment
User Comments (0)
About PowerShow.com