VBScript Sample:
vbscript/ado/employeereg/display.asp
   ASP Script
   Comments or Client-side Script
   HTML and Text

<html>
<head>
<title>Employee Example</title>
</head>
<body bgcolor="eadfdf">
<h1 align="center"><font face="Verdana, arial, helvetica" color="#003333">Employee
Example</font></h1>
<font face="Verdana, arial, helvetica">
<hr align="center">
</font><div align="center"><center>
<table border="1" width="100%" cellpadding="5" bordercolorlight="#666666" bordercolordark="#333333">
<tr>
<th> </th>
<th><font face="Verdana, arial, helvetica">Employee no</font></th>
<th><font face="Verdana, arial, helvetica">Employee name</font></th>
<th><font face="Verdana, arial, helvetica">Job</font></th>
<th><font face="Verdana, arial, helvetica">Manager</font></th>
</tr>

<%
   dim empno
   dim ename
   dim job
   dim mgr
   dim hiredate
   dim sal
   dim comm
   dim deptno
   dim i

   Set a = server.CreateObject("ADODB.CONNECTION")
   a.open Session("EmployeeStrcnn")

   set b = Server.createObject("ADODB.RECORDSET")
   b.open "select * from emp",a
   Set c = b.fields
   i = 0
   While Not b.EOF
      empno = c.Item(0).value
      ename = c.item(1).value
      job = c.item(2).value
      mgr = c.item(3).value
      i = i + 1
      b.movenext
%>

<tr>
<th><font face="Verdana, arial, helvetica">
<%=cstr(i)%> </font></th>
<th><font face="Verdana, arial, helvetica">
<%=empno%> </font></th>
<th><font color="#0000ff" face="Verdana, arial, helvetica"><a href>
<%=ename%> </a></font></th>
<th><font face="Verdana, arial, helvetica">
<%=job%> </font></th>
<th><font face="Verdana, arial, helvetica">
<%=mgr%> </font></th>
</tr>
<%
   Wend
%>

</table>
</center></div><font face="Verdana, arial, helvetica">
<%
   a.Close
%>

<p>
<a href="employee.asp"><font size="3" color="#0000ff">-----Return-----</font> </p>
</a></font>
</body>
</html>


Copyright © 1998-2002, Halcyon Software Inc. All rights reserved.