Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: ASP Query Timeout


Message #1 by Tom Achtenberg <toma@f...> on Tue, 21 May 2002 08:51:30 -0700
I am calling  the following query in a stored procedure from an ASP page with SQL Server.  I get the
following error message.  I have set the timeouts on both IIS and in my script to either the "0" unlimited value or to values like
600 minutes.  Any ideas as to what I can do to get it to run in an ASP page?  It takes anywhere fro 1-3 minutes to run in Query
Analyzer depending on the server load.  The tables  have anywhere from 300,000 to 3,000,000 records in them.

The error message:

Microsoft OLE DB Provider for SQL Server error '80040e31' 
Timeout expired 
/fh/css/css_sponscrosssup2.asp, line 47 

The query:

SELECT ds.desigcode, count(distinct n.name1_ref), sum(d.amount)
	FROM  name1 n
	join gifts g on n.name1_ref = g.name1_ref 
	join batches b on b.batch_ref = g.batch_ref 
	join detail d on d.check_ref = g.gift_ref 
	left join designat ds on ds.desig_ref = d.desig_ref 
	WHERE b.giftdate >= '10/01/1995' and 
	d.desig_ref not IN (SELECT desig_ref FROM designat WHERE desigcode between '50901' and '50999')
	and g.name1_ref in (select name1_ref from pledge join designat on pledge.desig_ref = designat.desig_ref where desigcode between
'50901' and '50999' and closed = 0)
	group by ds.desigcode
	order by ds.desigcode

Tom Achtenberg
Developer, Information Technologies
Food for the Hungry / US
(xxx) xxx-xxxx  (voice)
(xxx) xxx-xxxx  (fax)
Tom.Achtenberg@f...
Message #2 by Tom Achtenberg <toma@f...> on Tue, 21 May 2002 08:59:00 -0700
Sorry about posting this twice.

-----Original Message-----
From: Tom Achtenberg [mailto:toma@f...]
Sent: Tuesday, May 21, 2002 8:52 AM
To: ASP Databases
Subject: [asp_databases] ASP Query Timeout


I am calling  the following query in a stored procedure from an ASP page with SQL Server.  I get the following error message.  I
have set the timeouts on both IIS and in my script to either the "0" unlimited value or to values like 600 minutes.  Any ideas as to
what I can do to get it to run in an ASP page?  It takes anywhere fro 1-3 minutes to run in Query Analyzer depending on the server
load.  The tables  have anywhere from 300,000 to 3,000,000 records in them.

The error message:

Microsoft OLE DB Provider for SQL Server error '80040e31' 
Timeout expired 
/fh/css/css_sponscrosssup2.asp, line 47 

The query:

SELECT ds.desigcode, count(distinct n.name1_ref), sum(d.amount)
	FROM  name1 n
	join gifts g on n.name1_ref = g.name1_ref 
	join batches b on b.batch_ref = g.batch_ref 
	join detail d on d.check_ref = g.gift_ref 
	left join designat ds on ds.desig_ref = d.desig_ref 
	WHERE b.giftdate >= '10/01/1995' and 
	d.desig_ref not IN (SELECT desig_ref FROM designat WHERE desigcode between '50901' and '50999')
	and g.name1_ref in (select name1_ref from pledge join designat on pledge.desig_ref = designat.desig_ref where desigcode between
'50901' and '50999' and closed = 0)
	group by ds.desigcode
	order by ds.desigcode

Tom Achtenberg
Developer, Information Technologies
Food for the Hungry / US
(xxx) xxx-xxxx  (voice)
(xxx) xxx-xxxx  (fax)
Tom.Achtenberg@f...


  Return to Index