I have the following query in a stored procedure. When I try calling it from an ASP page I get the
following 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...