Solved

Timeout expired

Posted on 2003-11-10
3
1,439 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
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 …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

628 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