<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% Dim rs Dim rs_numRows Set rs = Server.CreateObject("ADODB.Recordset") rs.ActiveConnection = MM_nbconn_STRING rs.Source = "SELECT * FROM tblNobels ORDER BY nYear DESC, nCat;" rs.CursorType = 0 rs.CursorLocation = 2 rs.LockType = 1 rs.Open() rs_numRows = 0 %> Nobel Prize Winners

Nobel Prize Winners

<% rc = 0 : oy = 0 : oc = "" while not rs.EOF rc = rc + 1 cat = rs("nCat") yr = rs("nYear") who = rs("nName") if rs("nName2") <> "" then who = who &", " & rs("nName2") response.write("
") if yr <> oy then response.write("

" & yr & "

" & vbCrLf) oy = yr end if if oc <> cat then response.write("" & cat & ": ") oc = cat end if response.write("" & who) response.write("
" & vbCrLf) rs.Movenext wend if rc > 0 then response.write(rc & " records in database.") else %>

Not dynamic

Peace

1998
John Hume

Literature

2012
Mo Yan
1997
Dario Fo

Physics

1973
Leo Esaki
1954
Max Born
<% end if %>