Count Lines in Pages

Contents of Page: My4GroupDraftSetup.asp Number of Lines: 74 Last Modified: 8/22/2018 1:32:58 PM
0001: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
0002: 
0003: <!--#include file="include/constants.inc"-->
0004: <!--#include FILE="include/adovbs.inc" -->
0005: <!-- #include FILE="include/funcs.asp" -->
0006: 
0007: <%
0008:    	GroupID = Request.QueryString("ID")
0009:    	
0010:    	Set cn = Server.CreateObject("ADODB.Connection")
0011:    	cn.Open conn
0012: 	sqlString = "DELETE FROM MY4_DraftBoard " & _
0013: 							"WHERE GroupID = " & GroupID 
0014: 	cn.Execute sqlString, lngRecs, adExecuteNoRecords
0015: 	cn.Close
0016: 	Set cn = Nothing
0017:    	
0018:    	
0019: 	Set rs = Server.CreateObject("ADODB.Recordset")
0020: 	sqlString = "SELECT * FROM MY4_Field " 	
0021: 	rs.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0022: 				
0023: 	Do Until rs.EOF							
0024:     	Set rsdb = Server.CreateObject("ADODB.Recordset")		
0025:    		rsdb.Open "MY4_DraftBoard", conn, adOpenDynamic, adLockOptimistic, adCmdTable
0026:     	rsdb.AddNew
0027: 
0028:  		rsdb("GroupID").Value = GroupID
0029: 		rsdb("PlayerName").Value =  rs("PlayerName").Value
0030: 		rsdb("Rank").Value = rs("Rank").Value
0031:  		rsdb("Country").Value =  rs("Country").Value
0032: 	
0033:  		rsdb.Update
0034: 		rsdb.Close
0035: 		Set rsdb = Nothing
0036: 	
0037: 	rs.MoveNext
0038: 	Loop
0039: 	rs.Close
0040: 	Set rs = Nothing
0041: 	
0042: 	Set rsGr = Server.CreateObject("ADODB.Recordset")
0043: 	sqlString = "SELECT * FROM MY4_Registration " & _
0044: 							"WHERE GroupID = '" & GroupID & "'"
0045: 					
0046: 						
0047: 	rsGr.Open sqlString, conn,  adOpenDynamic, adLockOptimistic, adCmdText
0048: 	totRegs = rsGr.RecordCount
0049: 	rsGr.Close
0050: 	Set rsGr = Nothing
0051: 	
0052: 	'
0053: '  Update the Next Round/Pick in the Group
0054: '	totSSPicksMade = rsSSPicks.RecordCount
0055: 		
0056: 	Set rsRegs = Server.CreateObject("ADODB.Recordset")
0057: 	sqlString = "SELECT * FROM MY4_Group " & _
0058: 							"WHERE ID = " & GroupID 
0059: 							
0060: '  Response.Write(sqlString)							
0061: 	rsRegs.Open sqlString, conn,  adOpenDynamic, adLockOptimistic, adCmdText
0062: 	
0063: 	IF rsRegs.EOF Then
0064: 	  Response.Redirect("My4GroupInvalid.asp")
0065: 	Else
0066:     rsRegs("Entries").Value = totRegs
0067: 	rsRegs("CurrDraftRound").Value = 1
0068:     rsRegs("CurrDraftPick").Value = 1 
0069:     rsRegs.Update
0070: 	rsRegs.Close
0071: 	End If
0072: 	
0073: 	Response.Redirect("my4draftboardcreatedmsg.asp?ID=" & GroupID)		
0074: %>