Basic HTML version of Foils prepared 4 Feb 98

Foil 23 Sample code for ASP files - I

From Overview of Microsoft Access used with Active Server Pages(ASP) CPS616 Technologies of Information Age -- Spring 1998. by Nancy McCracken and Sangetta Aggarwal


1 <HTML><TITLE>Employees Directory</TITLE><BODY>
2 <h2> <center><font color=red>Form for Employees Directory</font></center></h2>
3 <%
4 If IsObject(Session("workpg_conn")) Then
5 Set conn = Session("workpg_conn") workpg is ODBC System
6 Else DSN for an Access db
7 Set conn = Server.CreateObject("ADODB.Connection")
8 conn.open "workpg","",""
9 Set Session("workpg_conn") = conn
10 End If
11 %>
12 <%
13 If cstr(Request.QueryString("ok_ans")) <> "" Then
14 rs.Fields("ok_ans").Value = Request.QueryString("ok_ans")
15 End If
16 If cstr(Request.QueryString("OptBody6")) <> "" Then
17 rs.Fields("OptBody6").Value = Request.QueryString("OptBody6")
18 End If
19 % >

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998