<% vSubCode = request.querystring("SubCode") set myconn= server.createobject("ADODB.Connection") myConn.Open "DSN=webresources" set myRst = server.createObject("ADODB.Recordset") if vSubCode= "All" then strSQL = "select * from tblMain order by title" vSubName = "Web Resources - All Subjects" elseif vSubCode="REF" then strSQL = "select [tblMain-Subject].*, qWithCat.* from [tblMain-Subject] inner join qWithCat on [tblMain-Subject].RecID = qWithCat.RecID where [tblMain-Subject].SubjectCode = '" & vSubCode & "' order by qWithCat.name, qWithCat.Title" vSubName = "General Reference" else ' strSQL = "select * from tblMain where SubjectCode = '" & vSubCode & "' order by title" strSQL = "select [tblMain-Subject].*, tblMain.* from [tblMain-Subject] inner join tblMain on [tblMain-Subject].RecID = tblMain.RecID where [tblMain-Subject].SubjectCode = '" & vSubCode & "' order by tblMain.title" 'Get subject or category name myRst.Open "select * from tblSubject where SubjectCode= '" & vSubCode & "'", myConn vSubName = myRst("Name") myRst.Close end if response.write("

" & vSubName & "

") myRst.open strSQL, myconn '**** Image Links ***** %>
<% if vSubCode="All" then %> DatabasesJournalsebooksResearch GuidesWeb Resources <% else %> DatabasesJournalsebooksResearch GuidesWeb Resources <% end if %>


<% vStrCat = "" response.write ("

    " & vbcrlf) do while not myRst.EOF if vSubCode="REF" then if myRst("Name") <> vStrCat then response.write ("

" & MyRst("Name") & "
    ") vStrCat = myRst("Name") end if end if %>
  • "> <%= myRst("title")%> <% ' if myrst("Description") <> "" then response.write("" & myRst("Description") & "
    ") ' end if response.write ("
    ") myRst.MoveNext loop response.write ("
    ") response.write ("
    ") myRst.Close myConn.Close set myRst2 = Nothing set myRst = Nothing Set myConn = Nothing %>