Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 376
  • Last Modified:

WEIRD TIMEOUT PROBLEM

Hi Experts,

I have a recordset which is held in a stored proceedure within Enterprise Manager. This SP checks an orders table based on order date whilst also cross-checking the orders table against an adjustments table. If an order has been adjusted then the adjusted order is shown instead of the original order.

I am calling the recordset from an ASP page.

This has been working fine but up until yesterday when I started experiencing problems.

When requesting orders for a period of a week or greater I am getting an ASP timeout error as follows:

**************************************************************

Microsoft OLE DB Provider for ODBC Drivers error '80040e31'

[Microsoft][ODBC SQL Server Driver]Timeout expired

/admin/aspIncludes/search_aspInclude.asp, line 122

**************************************************************

Where line 122 is the call to the stored proceedure in ASP.

I have run the same proceedure from within Query Analyser and it works fine.

I tried adding the following line to the top of the ASP page:

server.timeout = 6000

but the problem still persists.


Does anybody have any ideas?




Thanks,



PJORDANNA






0
pjordanna
Asked:
pjordanna
  • 3
  • 2
1 Solution
 
nurbekCommented:
try
Server.ScriptTimeout =Server.ScriptTimeout *2

0
 
kolluCommented:
Try
Server.ScriptTimeout =6000
0
 
pjordannaAuthor Commented:
OK,

Sorry for the delayed response. I have been out of the office for a while.

I now have the following code in a test ASP page:



<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% Server.ScriptTimeout =6000 %>
<!--#include file="../aspincludes/siteLocation_aspInclude.asp" -->
<!--#include file="../connections/parking.asp" -->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<%
timeoutVal = Server.ScriptTimeout
response.write("timeoutVal = " & timeoutVal & "<br><br>")


Set Cnx = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.Recordset")

Cnx.Open MM_Parking_STRING
connectionStr = "exec ordersAndAdjustments '12/1/2004','12/7/2004','','byOrderDate','','1','NEW','','','','','',''"
response.write(connectionStr)

RS.Open  connectionStr, Cnx


RS.Close
Cnx.Close


Set RS = nothing
Set Cnx = nothing

%>
</body>
</html>




This file still generates the followign error:


Microsoft OLE DB Provider for ODBC Drivers Column = -1 Description = [Microsoft][ODBC SQL Server Driver]Timeout expired File = /admin/salesTest.asp Line = 24 Number = -2147217871 Source = ALL_RAW = Connection: Keep-Alive


Where line 24 is - RS.Open  connectionStr, Cnx


I can't work out whats going on here. If I take the following line:


exec ordersAndAdjustments '12/1/2004','12/7/2004','','byOrderDate','','1','NEW','','','','','',''

And run it in Query Analyser it works fine so it can't be the stroed proc.


Anybody have any ideas?



Thanks,



PJORDANNA

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
nurbekCommented:

try this

Cnx.Open MM_Parking_STRING
connectionStr = "exec ordersAndAdjustments '12/1/2004','12/7/2004','','byOrderDate','','1','NEW','','','','','',''"
response.write(connectionStr)

Cnx.CommandTimeout=30

RS.Open  connectionStr, Cnx


RS.Close
Cnx.Close
0
 
pjordannaAuthor Commented:
nurbek,

Thanks a million.

Didn't know you could set the timeout within the RS object!



Cheers,




PJORDANNA
0
 
nurbekCommented:

You are wlecome



0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now