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!

Stored Procedure call is hanging on me.. Help!!

Status
Not open for further replies.

BG12424

Programmer
Jun 4, 2002
717
US
The following code is hanging my browser and timing out. Please help. Thanks

<%@ Language=VBScript %>
<!--#include file=&quot;../inc/common.asp&quot;-->
<%

dim rs1
dim cmd1
dim dbConn
dim userid


userid=326 'valid userid

Set cmd1 = Server.CreateObject(&quot;ADODB.Command&quot;)
with cmd1
.ActiveConnection = GetConnection
.CommandText = &quot;WVGetUserData&quot;
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter(&quot;@userid&quot;,adInteger,adParamInput, ,userid)
Set rs1 = .Execute
end with

%>

<HTML>
<HEAD>
</HEAD>
<BODY>
<%
on error resume next
do while not rs1.eof
Response.Write(rs1(&quot;username&quot;))
loop
on error goto 0

set cmd1 = Nothing
set rs1 = Nothing
%>

In the common asp included file is the following function:
function GetConnection
set GetConnection = Server.CreateObject(&quot;ADODB.Connection&quot;)
GetConnection.Open conn_ConnectionString
end function
regards,
Brian
 
This has happened to me before....no worries.

on error resume next
do while not rs1.eof
Response.Write(rs1(&quot;username&quot;))
rs1.MoveNext<---------- you need to add this line!!!!!
loop
on error goto 0 _______________________________________________
OutsideIntranets.com
Stop wasting time, get to work
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top