|
|
I am connecting to MS SQL server to display data in a table. I have a loop
command to select data based on a customer number. However, when the code
executes, it goes into a never ending loop. Code attached. Thanks for any
help!
<%response.buffer = false%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<!-- #include file="database_connection2.asp" -->
<!--#include file="checked_login.asp"-->
<head>
<title>Franklin Press</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="imagetoolbar" content="no" />
<link href="../bl-stylesheet.css" rel="stylesheet" type="text/css" />
<style type="application/xhtml+xml">
</style>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
left: 143px;
top: 153px;
}
#Layer2 {
position:absolute;
width:493px;
height:26px;
z-index:2;
left: 373px;
top: 220px;
}
body {
background-color: #FFFFFF;
}
.style44 {
color: #006633;
font-weight: bold;
}
-->
</style>
</head>
<body>
<div id="container">
<div id="header"><img src="../Franklin-press-color-logo-w.gif"
alt="logo"
width="180" height="68"/> </div>
<ul id="nav">
<li><a href="../index.asp"
title="Home">Home</a></li>
<li><a href="../services.html"
title="Services">Services</a></li>
<li><a href="../contact.html"
title="Contacts">Contacts</a></li>
<li><a href="../about.html"
title="About">About</a></li>
<li><a href="../security.html"
title="Security">Security</a></li>
</ul>
<div>
<p class="style44"><TABLE cellSpacing=0 cellPadding=0 border=0>
<TR>
<TD vAlign=bottom rowSpan=2><center>
<p><BR>
<span class="style44">Mail Tracking</span></p>
</center>
<blockquote>
<blockquote>
<blockquote>
<p align="justify">
<center>
To track your mail delivery, locate your job either by
number or
description and click on the "TRACK" link in the right-hand
column.<br>
</center>
</p>
</blockquote>
</blockquote>
</blockquote>
<form name="user_form" action="../copyofmail.asp" method="post">
<center>
<table width="738" border="1">
<tr>
<td align="center">Job Number</td>
<td align="center">Part Number</td>
<td align="center">Job Description</td>
<td align= "center">Quantity</td>
<td align= "center">Scanned</td>
<td align= "center">Track</td>
</tr>
<% sql1= "select [view contact].folder_id, [view contact].contactname,
jobmaster.id, jobmaster.customernumber, jobmaster.jobnumber,
jobmaster.mailingnumber, jobmaster.jobdescription, jobmaster.quantity,
jobmaster.mastervalidate from fp_vticket.dbo.[view contact],
confirm.dbo.jobmaster where jobmaster.customernumber = '" &
session("folder_id") & "'"
sqlrdy = sql1
if rstemp.state=1 then rstemp.close
rstemp.open sqlrdy,conn,3,1
do while not rstemp.EOF %>
<% if(counter mod 1 <>0) then %>
<tr>
<%
else
%>
<tr >
<%
end if
counter=counter+1
%>
<td align="center">
<%=rstemp("jobnumber") %>
</td>
<td align="center">
<%=rstemp("mailingnumber") %>
</font></td>
<td align="left">
<%=rstemp("jobdescription") %>
</font></td>
<td align="left">
<%=rstemp("quantity") %>
</font></td>
<td align="left">
<%=rstemp("mastervalidate") %>
</font></td>
<td align="left">
<a
href="../client/track.asp?id=<%=rstemp("customernumber")%>&jobnum=<%=rstemp("job
number")%>">
Track</a></li>
<%rstemp.movenext
loop%>
</tr>
<tr><td colspan="5" align="center"><input class="frmstyle"
onClick="history.back()" type="button" value="<<Back" name"back" ></td></tr>
</table>
</center>
<div align="center">
<p><a href="../index.asp">Logout & Return to Home Page</a><br>
</p>
</div>
</form>
</table>
<br />
</p>
</div>
</div>
</body>
</html>
|
|