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






pjordannaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.