home *** CD-ROM | disk | FTP | other *** search
/ sau9.org / sau9.org.zip / sau9.org / mathapp / student_status_conf.asp < prev    next >
Text File  |  2002-11-24  |  2KB  |  62 lines

  1. <%@ Language=VBScript %>
  2. <%
  3.  Response.Buffer = True
  4.  
  5.  
  6. Function ChkString(string)
  7.   If string = "" Then string = "0"
  8.    ChkString = Replace(string, "'", "'0'")
  9.    End Function
  10.  
  11. set tn = request.form("tn")
  12. response.write "<table> <tr> <Td><Font face=tahoma size=4><h2> Student Confirmation "
  13.  
  14. response.write "</td><td> <img src=math.gif width=140></td></tr></table>"
  15.  
  16. Dim iCount
  17.   iCount= Request("Count")
  18.  
  19.  
  20.  
  21. filePath = Server.MapPath("math_proj.mdb")
  22. Set conn = Server.CreateObject("ADODB.Connection")
  23.  
  24. conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath
  25.  
  26. Dim iLoop
  27.  
  28. for iLoop = 0 to iCount
  29.  
  30.  
  31.       ' Receiving values from Form
  32. strID=iLoop & ".id"
  33.    id = Request.Form(strID)
  34. strplaceCount=iLoop & ".placecount"
  35.     cntPlaceAttempt=request.Form(strplaceCount)
  36. strintStatus=iLoop & ".intstatus"
  37.     intStatus=request.form(strintStatus)
  38. stropBasic=iLoop & ".opBasic"
  39.    cntOperBAttempt =ChkString(Request.Form(stropBasic))
  40. stropInt=iLoop & ".opInt"
  41.     cntoperIAttempt=ChkString(Request.Form(stropINt))
  42. stropAdv=iLoop & ".opAdv"
  43.     cntoperAAttempt=ChkString(Request.Form(stropAdv))
  44.  
  45.  
  46. sql_update = "UPDATE tblperformance set intStatus='"
  47. sql_update=sql_update & intStatus & "', cntplaceAttempt='"
  48. sql_update=sql_update & cntplaceAttempt & "', cntoperBAttempt='"
  49. sql_update=sql_update & cntoperBAttempt & "', cntoperIAttempt='"
  50. sql_update=sql_update & cntoperIAttempt & "', cntoperAAttempt='"
  51. sql_update=sql_update & cntoperAAttempt &  "' WHERE idstudent="
  52. sql_update=sql_update & id
  53.  
  54. 'response.write sql_update
  55. conn.Execute (sql_update)
  56.    ' Done. Close the connection
  57. next
  58.  
  59. %>
  60.  
  61. Student settings have been edited.  <a href=student_changestatust.asp>Review </a> the information.
  62. </html>