<% Option Explicit %> Top point scorers

Top point scorers

This program starts in January and runs until the end of December.

<% Dim Connect,contestrs,Query,thismonth,n,mymonth Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "lucy" Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qrypoints" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %> <% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop %>
Year
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("points")%>
<% End If thismonth = Month(Date) Select Case thismonth Case 1 Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qryjan" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %> <% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop End If Case 2 Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qryfeb" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %>
Month
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("jan")%>
<% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop End If Case 3 Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qrymar" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %>
Month
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("feb")%>
<% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop End If Case 4 Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qryapr" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %>
Month
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("mar")%>
<% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop End If Case 5 Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qrymay" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %>
Month
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("apr")%>
<% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop End If Case 6 Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qryjun" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %>
Month
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("may")%>
<% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop End If Case 7 Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qryjul" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %>
Month
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("jun")%>
<% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop End If Case 8 Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qryaug" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %>
Month
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("jul")%>
<% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop End If Case 9 Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qrysep" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %>
Month
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("aug")%>
<% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop End If Case 10 Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qryoct" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %>
Month
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("sep")%>
<% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop End If Case 11 Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qrynov" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %>
Month
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("oct")%>
<% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop End If Case 12 Set contestrs = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM qrydec" contestrs.Open Query, Connect, adOpenStatic, adLockOptimistic n = contestrs.RecordCount If n > 0 Then %>
Month
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("nov")%>
<% Do Until contestrs.EOF %> <% contestrs.MoveNext Loop End If End Select contestrs.Close %>
Month
Name Country Points
<%=contestrs("player")%> <%=contestrs("country")%> <%=contestrs("dec")%>

Contest page