daily pastebin goal
76%
SHARE
TWEET

Untitled

a guest Aug 13th, 2017 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <title> ASP DATABASE</title>
  4. </head>
  5. <body bgcolor="white" text="black">
  6. <%
  7. Dim adoCon
  8. Dim rsG
  9. Dim strSQL
  10.  
  11. Set adoCon=Server.CreateObject("ADODB.Connection")
  12.  
  13. strProvider="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\") + "\Mark.mdb"
  14.  
  15. Set rsG = Server.CreateObject("ADODB.recordset")
  16. rsG.Open "SELECT * FROM TenthStateBoard",strProvider
  17. flag=0
  18. Response.Write("<table>")
  19. Do While not rsG.EOF
  20.  
  21.  
  22. if (trim(Request.Form("RegNo"))=rsG("RegNo")) then
  23. flag=1
  24. Response.Write("<tr><td>")
  25. Response.Write("Reg No <td>")
  26. Response.Write(rsG("RegNo"))
  27.  
  28. Response.Write("<tr><td>")
  29. Response.Write("Name <td>")
  30. Response.Write(rsG("Name"))
  31.  
  32. Response.Write("<tr><td>")
  33. Response.Write("Tamil<td>")
  34. Response.Write(rsG("Tamil"))
  35.  
  36. Response.Write("<tr><td>")
  37. Response.Write("English<td>")
  38. Response.Write(rsG("English"))
  39.  
  40.  
  41. Response.Write("<tr><td>")
  42. Response.Write("Maths<td>")
  43. Response.Write(rsG("Maths"))
  44.  
  45. Response.Write("<tr><td>")
  46. Response.Write("Science<td>")
  47. Response.Write(rsG("Science"))
  48.  
  49. Response.Write("<tr><td>")
  50. Response.Write("Social<td>")
  51. Response.Write(rsG("Social"))
  52.  
  53. Response.Write("<tr><td>")
  54. Response.Write("Result<td>")
  55.  
  56. if ( (rsG("Tamil") < 35) or (rsG("English") < 35) or (rsG("Maths") < 35) or (rsG("Science") < 35) or (rsG("Social") < 35) ) then
  57. Response.Write("Fail")
  58. else
  59. Response.Write("Pass")
  60. end if
  61. end if
  62. rsG.MoveNext
  63. LOOP
  64. Response.Write("</table>")
  65. if flag=0 then
  66. Response.Write("Reg. No Not Appeared for Exam")
  67. end if
  68. rsG.Close
  69. Set rsG=Nothing
  70. Set adoCon=Nothing
  71. %>
  72. </body>
  73. </html>
RAW Paste Data
Top