10. Appendix
<%
'Declare variables and open connection
Set DataConn = Server.CreateObject("ADODB.Connection")
DataConn.Open "Libreports"
set RSlist = createobject("adodb.recordset")
dim myquery
libtext = Request("libtext")
datetext = Request("datetext")
ctytext = Request("ctytext")
myquery = "SELECT Library.Netfix, Report.Library, Report.ReportID, Report.[Exact dates], Report.[No of report], Report.[No Pages], Report.Signatories, Report.[Institutions declared covered] FROM Library INNER JOIN Report ON Library.Library = Report.Library WHERE (((Report.Library) LIKE '%" & libtext & "%') AND ((Report.[Exact dates]) LIKE '%" & datetext & "%') AND ((Library.Country) LIKE '%" & ctytext & "%'))"
RSlist.open myquery,DataConn,1,1
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Results of your search</title>
</HEAD>
<BODY>
<H2>Results of your search</H2>
<p>Your search for "<%=libtext%> <%=datetext%> <%=ctytext%>" returned <em><%=RSlist.RecordCount%></em> records.</p>
<p>To see further details of any particular report, select a report in the "Select report" column, then click the button "Show further details of the selected report" at the bottom of the page.</p>
<p>Alternatively you may display details of a particular location by clicking on the location in the "Library" column.</p>
<form action="select.asp">
<table border="1">
<tr><td><b>Library</b></td><td><b>Dates</b></td><td><b>Issue no.</b></td><td><b>No. of pages</b></td><td><b><a href=Signatories.asp>Signatories</a></b></td><td><b>Institutions declared covered</b></td><td><b>Select report</b></td></tr>
<% Do while Not RSlist.Eof %>
<tr><td><a href="place.asp?liby=<%=RSlist("Netfix")%>"><%=RSlist("Library")%></a></td><td><%=RSlist("Exact dates")%></td><td><%=RSlist("No of report")%></td><td><%=RSlist("No Pages")%></td><td><%=RSlist("Signatories")%></td><td><%=RSlist("Institutions declared covered")%></td><td><INPUT TYPE="radio" NAME="Sel" VALUE="<%=RSlist("ReportID")%>" </td></tr>
<% RSlist.Movenext
Loop %>
</table>
<p><input type="submit" value="Show further details of the selected report"> </p>
</form>
</BODY>
</HTML>
<%
' Close database conection
RSlist.Close
DataConn.Close
' Free up memory
Set RSlist = Nothing
Set DataConn = Nothing
%>