Download presentation
Presentation is loading. Please wait.
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 <% to begin the Vb Script %> to begin the Vb Script
3
Step 1: The variables <% 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 = "DRIVER={Microsoft 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) %>
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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.