ASP and Database Connectivity Masters Project CS 490
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
Step 1: The variables <% Dim sql Dim oRS Dim oConn, sConnString
Step 2: The connection type Set oConn = Server.CreateObject("ADODB.Connection")
Step 3: The driver used sConnString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _ "DBQ=" & Server.MapPath("\murf\db\neiu.mdb") & ";"
Step 4: Open the connection oConn.Open(sConnString)
Step 4: SQL select sql = "select Course, Grade, Semester, Year from Classes"
Step 4: execute the connection Set oRS = oConn.Execute(sql) %>
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.