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


<HTML><TITLE>Employees Directory</TITLE><BODY>
<h2> <center><font color=red>Form for Employees Directory</font></center></h2>
<%
If IsObject(Session("workpg_conn")) Then
Set conn = Session("workpg_conn") workpg is ODBC System
Else DSN for an Access db
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "workpg","",""
Set Session("workpg_conn") = conn
End If
%>
<%
If cstr(Request.QueryString("ok_ans")) <> "" Then
rs.Fields("ok_ans").Value = Request.QueryString("ok_ans")
End If
If cstr(Request.QueryString("OptBody6")) <> "" Then
rs.Fields("OptBody6").Value = Request.QueryString("OptBody6")
End If
% >



© 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 Wed Feb 4 1998