Solved

Timeout expired

Posted on 2003-11-10
3
1,428 Views
Last Modified: 2010-04-06
All,

I am running a Stored Procedure from a Web Page and I continually get the following error.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E31)
[Microsoft][ODBC SQL Server Driver]Timeout expired
/OMSEDD/inc/vbsubs.inc, line 7

VBsubs.inc - Creates My recordset.
------------------------------------------------------------------------
<%
Sub LoadRecordSet(rstRecordset, strSQLStatement)
      SET cmdSP = CreateObject("ADODB.Command")
      cmdSP.CommandText = strSQLStatement
      cmdSP.ActiveConnection = cnnGlobalConnection
      SET rstRecordset= CreateObject("ADODB.Recordset")
      SET rstRecordset= cmdSP.Execute
End Sub
%>
---------------------------------------------------------------------------
Connection  - Creates My connection object.
------------------------------------------------------------------------
<%
Sub OpenConnection
      Set cnnGlobalConnection = Server.CreateObject("ADODB.Connection")
      cnnGlobalConnection.ConnectionString = "driver={SQL Server};server=SNORSQLTEST02;uid=webaccess;pwd=webconnect;database=OMSEDD"
      cnnGlobalConnection.CommandTimeout = 0
      cnnGlobalConnection.ConnectionTimeout = 0
      cnnGlobalConnection.Open
      End Sub
%>
-----------------------------------------------------------------------------

Can anyone explain to me why I am getting a timeout and how I can fix it?

Thanks
0
Comment
Question by:Uugeman
  • 3
3 Comments
 
LVL 35

Accepted Solution

by:
YZlat earned 25 total points
ID: 9716352
try putting this line on the top of the page:

<% Server.ScriptTimeout = 480 %>
0
 
LVL 35

Expert Comment

by:YZlat
ID: 9716363
in case the problem is not your asp script, try optimizing your sql query by adding WHERE clause and make sure your table has a primary key
0
 
LVL 35

Expert Comment

by:YZlat
ID: 9716386
also you can try modifying the following keys in the registry:

HKLM/p2pLog/p2pLog/1.0/dbaccess/CommandTimeout
HKLM/p2pLog/p2pLog/1.0/dbaccess/ConnectionTimeout

the above are set to 300 by default
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows Standards for file storage. 3 35
How to silent print from safari browser 6 277
WCAG audit tools 1 99
Unexpected End of File 11 54
Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to count occurrences of each item in an array.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question