Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script times out 1

Status
Not open for further replies.

Rydel

Programmer
Feb 5, 2001
376
CZ
I am used to DSN-less connections, but now I changed an ISP provider and I must use DSN. I am trying one script locally (IIS, localhost), and it times out. During the whole time, it is 100% CPU time. What the heck is it doing???

Maybe, I am not using it right. I have successfully created a systedm DSN "links1". And then I wrote this:

Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DSN=links1"
strSQL = "SELECT * FROM URLs"
Dim objRS
Set objRS = objConn.Execute(strSQL)

Response.Write(&quot;<table>&quot;)
Do while not objRS.EOF
%>
<tr>
<td><%=objRS(&quot;ID&quot;)%></td>
<td><%=objRS(&quot;URL&quot;)%></td>
<td>
<%if objRS(&quot;ID&quot;)=currID then
Response.Write(&quot;YES!&quot;)
end if
%></td>
</tr>
<%
Loop
Response.Write(&quot;</table>&quot;)

Any help greatly appreciated!!! ---
---
 
You've forgotten to add the MoveNext statement - at the moment the code is justing looping round and round the open recordset. All you need to do is add objRS.MoveNext before Loop.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top