REPORT / LISTING  PROGRAM
Example : Report Through ASP Program.

<%
   Option Explicit
%>
  <html>
  <head>
  <title> Date :<% =Date() %> </title>
  </head>
  <%
    Dim dcnDB
    Dim rsCat
    Dim strSQL

set dcnDB = Server.CreateObject("ADODB.Connection")
  dcnDB.ConnectionString="Provider=MSDAORA.1;Password=tiger;
  User ID=scott;Data Sorce=PAS;Persist Security Info=True;"
  dcnDB.Open
  strSQL="select * from pasaa order by roll_no"
  set rsCAT=dcnDB.Execute(strSQL)
  %>


<body text="blue"><center>
  <font size="5" color="green">
  BHARAT HEAVY ELECTRICALS LIMITED <br>
  HRDC DEPARTMENT <br>
  Trainee's List, Pasaa Trade <br><br>
  </font> <font size="4" color="red">
  Repot Date : <% =Date() %>
  </font>

<%
    Response.write "<table border="0">
    <tr> <td> <b><u> Roll_No </td>" &_
    "<td>Name</td> <td> Trade </td>" &_
    "<td>Joining Date </td><td>End Date </td>" &_
    "<td> Addres </td> <td> Phone_No </td></tr>"

   Do while not rsCAT.EOF
   Response.write "<tr><td>" & rsCAT("roll_no")& "</td>"
   Response.write "<td>" & rsCAT("name")& "</td>"
   Response.write "<td>" & rsCAT("trade")& "</td>"
   Response.write "<td>" & rsCAT("doj")& "</td>"
   Response.write "<td>" & rsCAT("doe")& "</td>"
   Response.write "<td>" & rsCAT("address")& "</td>"
   Response.write "<td>" & rsCAT("phone")& "</td>"

   rsCAT.MoveNext
   Loop
  %>
<%
rsCAT.close
dcnDB.close
  %>

<a href=" " onClick="window.close()">
  <font size="5" color="red">EXIT </font></a>
  <br>
    </tr>
    </table>
    </center>
    </body>
    </html>
Hosted by www.Geocities.ws

1