Uugeman
asked on
Timeout expired
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.Comman d")
cmdSP.CommandText = strSQLStatement
cmdSP.ActiveConnection = cnnGlobalConnection
SET rstRecordset= CreateObject("ADODB.Record set")
SET rstRecordset= cmdSP.Execute
End Sub
%>
-------------------------- ---------- ---------- ---------- ---------- ---------
Connection - Creates My connection object.
-------------------------- ---------- ---------- ---------- ---------- ------
<%
Sub OpenConnection
Set cnnGlobalConnection = Server.CreateObject("ADODB .Connectio n")
cnnGlobalConnection.Connec tionString = "driver={SQL Server};server=SNORSQLTEST 02;uid=web access;pwd =webconnec t;database =OMSEDD"
cnnGlobalConnection.Comman dTimeout = 0
cnnGlobalConnection.Connec tionTimeou t = 0
cnnGlobalConnection.Open
End Sub
%>
-------------------------- ---------- ---------- ---------- ---------- ---------- -
Can anyone explain to me why I am getting a timeout and how I can fix it?
Thanks
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
SET cmdSP = CreateObject("ADODB.Comman
cmdSP.CommandText = strSQLStatement
cmdSP.ActiveConnection = cnnGlobalConnection
SET rstRecordset= CreateObject("ADODB.Record
SET rstRecordset= cmdSP.Execute
End Sub
%>
--------------------------
Connection - Creates My connection object.
--------------------------
<%
Sub OpenConnection
Set cnnGlobalConnection = Server.CreateObject("ADODB
cnnGlobalConnection.Connec
cnnGlobalConnection.Comman
cnnGlobalConnection.Connec
cnnGlobalConnection.Open
End Sub
%>
--------------------------
Can anyone explain to me why I am getting a timeout and how I can fix it?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
also you can try modifying the following keys in the registry:
HKLM/p2pLog/p2pLog/1.0/dba ccess/Comm andTimeout
HKLM/p2pLog/p2pLog/1.0/dba ccess/Conn ectionTime out
the above are set to 300 by default
HKLM/p2pLog/p2pLog/1.0/dba
HKLM/p2pLog/p2pLog/1.0/dba
the above are set to 300 by default