Solved

Timeout expired

Posted on 2003-11-10
3
1,416 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
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 basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now