<%@ LANGUAGE="VBSCRIPT" %> <% Dim results,term,srchtype,srchlike,displayorder,SqlJunk results = Request.form("search_string") term = Request.Form("dbsearchtext") srchtype = Request.Form("TypeSearch") srchlike = Request.Form("search_like") displayorder = Request.Form("display_order") SqlJunk = "Select top " SqlJunk = SqlJunk & results & " * from Catalogue" %> <%If srchlike = "contain" Then srchlike = "%" Else srchlike = "" End If%> <%If displayorder = "" Then displayorder = "title" End If%> Search Results

University of London Library Catalogue

New York University Collection

<% Set dbGlobalWeb = Server.CreateObject("ADODB.Connection") dbGlobalWeb.Open("nyu") %> <% If Request.Form("TypeSearch") = "title" Then SqlJunk = SqlJunk & " WHERE title LIKE '" & srchlike & Request.Form("dbsearchtext") & "%' order by " & displayorder End If If Request.Form("TypeSearch") = "author" Then SqlJunk = SqlJunk & " WHERE author LIKE '" & srchlike & Request.Form("dbsearchtext") & "%' order by " & displayorder End If If Request.Form("TypeSearch") = "subject" Then SqlJunk = SqlJunk & " WHERE subject LIKE '" & srchlike & Request.Form("dbsearchtext") & "%' order by " & displayorder End If Set rsGlobalWeb = Server.CreateObject("ADODB.Recordset") rsGlobalWeb.Open SqlJunk, dbGlobalWeb, 3, 3 count = rsGlobalWeb.RecordCount %>
Choose Search Options:
search term

Or browse entire catalogue: by title | by author | by subject


Results

<%If term = "" Then count = 0 end if%> <%If Count > Request.form("search_string") - 1 Then Response.Write("More than ") End If If Count = 1 Then%> <%=count%> record found <%Else%> <%=count%> records found <%End If%>
<% If rsGlobalWeb.BOF And rsGlobalWeb.EOF Then%> Sorry, there are no <%= srchtype %>s that <%= Request.Form("search_like") %> "<%= term %>" in this catalogue

You may have more luck using a shorter search term.

<%Else%> <%If Not rsGlobalWeb.BOF Then%> <%If term = "" Then%> Please enter a search term <% Else %>
<% Do While Not rsGlobalWeb.EOF %>
<%=RSGlobalWeb("title")%> <%=RSGlobalWeb("volume")%>
Author: <%=RSGlobalWeb("author")%>
Call Number: <%=RSGlobalWeb("call number")%>
Notes: <%=RSGlobalWeb("notes")%>
Subject: <%=RSGlobalWeb("Subject")%>


<% rsGlobalWeb.MoveNext Loop %>
<%End If%> <%End If%> <%End If%> <% rsGlobalWeb.Close dbGlobalWeb.Close %>