Count Lines in Pages

Contents of Page: UpdateHallOfFame.asp Number of Lines: 83 Last Modified: 8/22/2018 1:33:23 PM
0001: <% @Language = "VBScript" %>
0002: 
0003: <!-- #include FILE="include/adovbs.inc" -->
0004: <!-- #include FILE="include/constants.inc" -->
0005: 
0006: <%
0007: 
0008: 	yr = Request.QueryString("yr")
0009: 	If yr = "" Then yr = season
0010: 
0011: 		Set cn = Server.CreateObject("ADODB.Connection")
0012: 		cn.Open conn
0013: 		sqlString = "DELETE FROM mmHistory " & _
0014: 							"WHERE Season = " & yr 
0015: 		cn.Execute sqlString, lngRecs, adExecuteNoRecords
0016: 		cn.Close
0017: 		Set cn = Nothing
0018: 
0019: 		Rank = 0
0020: 
0021: 		Set rs = Server.CreateObject("ADODB.Recordset")
0022: 		sqlString = "SELECT * FROM mmStandings " & _
0023: 								"WHERE Season = " & yr 
0024: 		rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0025: '		Response.Write(sqlstring & "<BR>")
0026: 		Do Until rs.EOF
0027:         Rank = rs("Rank").Value
0028:  '       Response.Write("Rank=" & Rank & "<br>")
0029: 		If Rank < 11 Then
0030: 		yr = rs("Season").Value
0031: 
0032: 		EntryName = rs("Name").Value
0033: 		TeamName = rs("Champion").Value
0034: 		CitySt= rs("City").Value
0035: 		totpts = rs("Pts").Value
0036: 		TeamName = rs("Champion").Value
0037: 		RunnerUp = rs("RunnerUp").Value
0038: 		RegNumber = rs("RegNumber").Value
0039: 
0040: 				Set rsm = Server.CreateObject("ADODB.Recordset")
0041: 	sqlString = "SELECT * FROM MY4_Master " & _
0042: 							"WHERE RegNumber = '" & RegNumber & "' " 
0043: 	rsm.Open sqlString, conn2, adOpenDynamic, adLockOptimistic, adCmdText
0044: 
0045: 	If Rsm.EOF Then
0046: 	'
0047: 	Else
0048: 
0049:  			FirstName = rsm("FirstName").Value
0050:  			LastName = rsm("LastName").Value
0051: 
0052: 			EntryName = FirstName & " " & LastName
0053: 
0054:      End If
0055: 		
0056: 		Set rstopten = Server.CreateObject("ADODB.Recordset")
0057: 		rstopten.Open "mmHistory", conn, adOpenDynamic, adLockOptimistic, adCmdTable
0058: 		rstopten.AddNew
0059: 		rstopten("Season").Value = yr
0060: 		rstopten("Rank").Value = Rank
0061: 		rstopten("Name").Value = EntryName
0062: 		rstopten("Champion").Value = TeamName
0063: 		rstopten("City").Value = CitySt
0064: 		rstopten("Pts").Value = totpts
0065: 		rstopten("Champion").Value = TeamName
0066: 		rstopten("RunnerUp").Value = RunnerUp
0067:        rstopten.Update
0068:        rstopten.Close
0069:        Set rstopten = Nothing
0070: 	   rs.Update
0071:        End If
0072: 
0073: 		rs.MoveNext
0074: 		Loop
0075: 		rs.Close
0076: 		Set rs = Nothing
0077: 
0078: 
0079: 
0080: 	
0081: 	   Response.Write("Hall Of Fame Updated for Season " & yr)
0082: 
0083: %>