Hello,
I'm writing my first ASP page that uses a SQL 2000 DB on the backend and am having a few problems with it. I know I must be doing something wrong.
I'm connecting to a server with the information below.
Server Name: SQLITSERVER
Database Name: ITDB
Table Name:Workstation_Bios_Information
The asp that I've wrote to use is this:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Workstation Bios Information</title>
</head>
<body>
<p align="center"><img border="0" src="images/logo-small.gif"></p>
<p align="center"><b><font size="5" face="Arial">Workstation Bios
Information</font></b></p>
<div align="center">
<center>
<TABLE borderColor=#000000 cellSpacing=0 cellPadding=2 border=1>
<TBODY>
<TR style="BACKGROUND: #009FD7; COLOR: white" bgColor=#009FD7>
<TD width="148" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>System
Name</i></font> </TD>
<TD width="148" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>System
Manufacturer</i></font> </TD>
<TD width="148" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>System
Model</i></font> </TD>
<TD width="149" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>System
Serial Number</i></font> </TD>
<TD width="149" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>System
Bios Revision</i></font> </TD>
<TD width="149" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>System
Bios Version</i></font> </TD>
<TD width="149" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>Collection
Date</i></font> </TD>
</TR>
<%
dim oRsSWBI
Set oRsSWBI=Server.CreateObject("ADODB.Connection"
oRsSWBI.Open "driver=SQL Server;server=ITSQLSERVER;uid=ITUSER;pwd=ITPASSWORD;database=ITDB;"
Set oRsSWBITbl=oRsSWBI.Execute("SELECT * FROM Workstation_Bios_Information"
oRsSWBITbl.Sort = SystemName
Do While Not oRsSWBITbl.EOF
TblIdx = TblIdx+1
If TblIdx = 1 Then
TrClr = "#cccccc"
End If
If TblIdx = 2 Then
TrClr = "#ffffff"
End If
Response.Write "<TR bgColor="&TrClr&">"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("SystemName"&"</font></TD>"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("SystemManufacturer"&"</font></TD>"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("SystemModel"&"</font></TD>"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("SystemSerialNumber"&"</font></TD>"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("SystemBiosRevision"&"</font></TD>"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("SystemBiosVersion"&"</font></TD>"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("CollectionDate"&"</font></TD>"
Response.Write "</TR>"
If TblIdx = 2 Then
TblIdx = 0
End If
Loop
%>
</table>
</center>
</div>
</body>
</html>
All it seems to do is spike the processor on the server and return "Page Can Not Be Displayed" script.timeout error.
Any help in writing this correctly to have as an example to work from would be appreciated.
I'm writing my first ASP page that uses a SQL 2000 DB on the backend and am having a few problems with it. I know I must be doing something wrong.
I'm connecting to a server with the information below.
Server Name: SQLITSERVER
Database Name: ITDB
Table Name:Workstation_Bios_Information
The asp that I've wrote to use is this:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Workstation Bios Information</title>
</head>
<body>
<p align="center"><img border="0" src="images/logo-small.gif"></p>
<p align="center"><b><font size="5" face="Arial">Workstation Bios
Information</font></b></p>
<div align="center">
<center>
<TABLE borderColor=#000000 cellSpacing=0 cellPadding=2 border=1>
<TBODY>
<TR style="BACKGROUND: #009FD7; COLOR: white" bgColor=#009FD7>
<TD width="148" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>System
Name</i></font> </TD>
<TD width="148" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>System
Manufacturer</i></font> </TD>
<TD width="148" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>System
Model</i></font> </TD>
<TD width="149" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>System
Serial Number</i></font> </TD>
<TD width="149" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>System
Bios Revision</i></font> </TD>
<TD width="149" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>System
Bios Version</i></font> </TD>
<TD width="149" valign="middle" align="center" bgcolor="#009FD7"><font face="Arial"><i>Collection
Date</i></font> </TD>
</TR>
<%
dim oRsSWBI
Set oRsSWBI=Server.CreateObject("ADODB.Connection"
oRsSWBI.Open "driver=SQL Server;server=ITSQLSERVER;uid=ITUSER;pwd=ITPASSWORD;database=ITDB;"
Set oRsSWBITbl=oRsSWBI.Execute("SELECT * FROM Workstation_Bios_Information"
oRsSWBITbl.Sort = SystemName
Do While Not oRsSWBITbl.EOF
TblIdx = TblIdx+1
If TblIdx = 1 Then
TrClr = "#cccccc"
End If
If TblIdx = 2 Then
TrClr = "#ffffff"
End If
Response.Write "<TR bgColor="&TrClr&">"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("SystemName"&"</font></TD>"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("SystemManufacturer"&"</font></TD>"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("SystemModel"&"</font></TD>"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("SystemSerialNumber"&"</font></TD>"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("SystemBiosRevision"&"</font></TD>"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("SystemBiosVersion"&"</font></TD>"
Response.Write " <TD width="&chr(34)&"148"&chr(34)&" align="&chr(34)&"center"&chr(34)&"><font face="&chr(34)&"Arial"&chr(34)&">"&oRsSWBITbl("CollectionDate"&"</font></TD>"
Response.Write "</TR>"
If TblIdx = 2 Then
TblIdx = 0
End If
Loop
%>
</table>
</center>
</div>
</body>
</html>
All it seems to do is spike the processor on the server and return "Page Can Not Be Displayed" script.timeout error.
Any help in writing this correctly to have as an example to work from would be appreciated.