MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 21st, 2008, 03:41 PM
mmcnab mmcnab is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2008
Posts: 5 mmcnab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 42 m 45 sec
Reputation Power: 0
Loop will not stop!

I have a query to dislay text from my SQL database onto a table on my web page. The query works in Management Studio, but when I apply it to my web page (ASP, VBScript) it goes into an unending loop. Here's the code. The '" &session("folder_id") & "'" merely maintains the session with the client after successful login. Any help would be appreciated!

<% sql1= "select [view contact].folder_id, [view contact].contactname, jobmaster.id as iid, jobmaster.customernumber, jobmaster.jobnumber, jobmaster.partnumber, 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") %>
&nbsp;</td>
<td align="center">
<%=rstemp("partnumber") %>
&nbsp;</font></td>
<td align="left">
<%=rstemp("jobdescription") %>
&nbsp;</font></td>
<td align="left">
<%=rstemp("quantity") %>
&nbsp;</font></td>
<td align="left">
<%=rstemp("mastervalidate") %>
&nbsp;</font></td>
<td align="left">
<a href="track.asp?id=<%=rstemp("iid")%>&jobnum=<%=rstemp("jobnumber")%>">
Track</a></li>
<%rstemp.movenext
loop
%>

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Loop will not stop!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway