Sun Java System Active Server Pages: Getting Started...   JScript ADO Test Sun Microsystems Logo
Results   Source Code

ITEM_ID SERIAL ITEM_TYPE MACHINE OWNER LOCATION
C34 CEN01234 Machine PIG mikeg Mike's office
M33 724024R00104297A Monitor PIG mikeg Mike's office
C35 10302 Machine GECKO jima Jim's office
M34 70800BR00218653 Monitor GECKO jim Jim's office
M35 MH2754272754 Monitor GORILLA unused Back office
M38 410A800447 Monitor UNUSED unused Lab
C39 22255 Machine UNUSED oos Lab
C40 CEN0018 Machine UNUSED oos Lab
M39 AE0-41701609 Monitor SPARE unused Lab
M41 CA2-58MT00811 Monitor SPARE unused Lab
M42 400A02172 Monitor WOLF billta Hall
C41 800-8299 Machine WOLF billta Hall
C14 225APT006887 Machine QUOKKA unused Lab
C1 11111 Machine FOOBAR jb Andrew's office
M1 MAL136323 Monitor BASSET billta Bill's office
C2 CEN0001 Machine ARMADILLO billta Bill's office
M2 MA2944061260 Monitor ARMADILLO billta Bill's office
C4 JP9A-003500 Machine CENTRICBACK1 billta Lab
C5 CEN0003 Machine WEBSERV1 billta Lab
C9 1153843 Machine LABRAT2 unused Lab
M7 MALA04418 Monitor LABRAT2 unused Lab
M8 609007R00909384H Monitor SPARE unused Lab
C11 CEN0007 Machine OTTER rebecca Rebecca's office
M10 71000BR00222123 Monitor OTTER rebecca Rebecca's office
C12 11236 Machine PLATYPUS mikea Mike's office
M11 71000BR00222238 Monitor PLATYPUS mikea Mike's office
M13 45799326 Monitor QUOKKA unused Lab
C15 CEN0008 Machine BOBCAT2 eric Eric's office
M14 MH1934435075 Monitor BOBCAT2 eric Eric's office
C16 CEN0009 Machine PANTHER mikel Mikel's office
M15 70800BR00218491 Monitor PANTHER mikel Mikel's office
C21 225APT007831 Machine HUSKY nancyg Nancy's office
C18 3RRG9 Machine BISON scott Scott's office
M17 442349501 Monitor BISON mikeg Scott's office
C19 12111 Machine WOMBAT kert Kert's office
M18 71000BR00222204 Monitor WOMBAT kert Kert's office
M20 504A501559 Monitor HUSKY nancyg Nancy's office
C23 CEN0011 Machine ORCA dani Dani's office
M22 662002934 Monitor ORCA dani Dani's office
C24 CEN0012 Machine SPIDER unused Back office
C25 US70100005 Machine WILDEBEEST unused Lab
M24 603BD03HA510 Monitor WILDEBEEST unused Lab
C26 10854 Machine TURTLE ricks Rick's office
M25 722024R00103924A Monitor TURTLE ricks Rick's office
C30 CEN0014 Machine AARDVARK timr Tim's office
M29 AI0-50703702 Monitor AARDVARK timr Tim's office
C31 225APT007878 Machine LYNX andrewb Andrew's office
M30 1162044033 Monitor LYNX andrewb Andrew's office
C33 3544 Machine HAWK mikeg Andrew's office
M32 MA2944051254 Monitor HAWK andrewb Andrew's office

 
Click Here to View Source
Source Code 

<%
var conn = Server.CreateObject("ADODB.Connection")
conn.Open(Application("DIAG_DB_CONN"))
var strSQL = "SELECT * FROM " + Application("DIAG_TABLE")
var rs = conn.Execute(strSQL)
%>

<p>
<table border="1">
<tr>
<%
for (i = 0; i < rs.Fields.Count - 1; i++)
{
%>

<td><b><%= rs.Fields(i).Name %></b></td>
<%
}
%>

</tr>

<% while (!rs.EOF) { %>
<tr>
<%
for (i = 0; i < rs.Fields.Count - 1; i++)
{
%>

<td VALIGN="TOP"><%= rs(i) %></td>
<%
}
%>

</tr>
<%
rs.MoveNext()
}
%>

</table>
<%
rs.Close()
conn.Close()
%>

Getting Started | Documentation | Developer Resources | Support | Product Tour | Sun Java System Active Server Pages Web site | Purchase

© 2003 Legal Information.