<%@ Language=VBScript %> <% Dim rs dim rs2 Dim rsNames dim strq dim strpict dim strRootPath dim strRow1 dim strRow2 dim strRow3 dim strRow dim kount strRootpath = left(server.MapPath("home.htm"),len(server.MapPath("home.htm"))-8) set conn=Server.CreateObject("ADODB.Connection") set rs = Server.CreateObject("ADODB.recordset") set rs2 = Server.CreateObject("ADODB.recordset") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open strrootpath & "db\GrammarWeb.mdb" 'strq = "SELECT DISTINCT Photos.photono, Photos.[photoname], [Year] & ' ' & [category] & ' ' & [header] AS Description " 'strq = strq & " FROM PhotoKeys INNER JOIN PhotoNames ON PhotoKeys.[New Ref] = PhotoNames.Ref" strq = "SELECT DISTINCT photos.PhotoNo, photos.photoName , [Year] & ' ' & [category] & ' ' & [header] AS Description " strq = strq & " FROM photos INNER JOIN [PhotoNames] ON photos.PhotoNo = [PhotoNames].Photo" strq = strq & " where photos.photono = " & request("ID") rs.open strq ,conn strPict = "dataImages/" & rs("photoname") & ".jpg" strq = "select surname,row from photonames where photo = " & rs("photono") strq = strq & " order by id" rs2.open strq , conn kount = 0 strRow = "Z" do while not rs2.eof if rs2("Row") <> strRow then strRow = rs2("row") kount = kount + 1 end if if kount = 1 then strRow1 = strRow1 & " " & rs2("surname") if kount = 2 then strRow2 = strRow2 & " " & rs2("surname") if kount = 3 then strRow3 = strRow3 & " " & rs2("surname") rs2.movenext loop %> Untitled Document
Wigan Grammar School
Photograph Detail
 
 
<%= rs("description") %> 
<% =strRow1 %>
<% =strRow2 %>
<% =strRow3 %>