Solved

WAITFOR DELAY stored procedure timeout expired on SQL Server 2000

Posted on 2008-10-24
4
1,406 Views
Last Modified: 2013-11-30
Hi all.

I have a stored procedure provided in the code snippet. When I run it in my ActiveXScript in my DTS:

oConn.Execute =  "[SDI].dbo.spDelay '0:1:0'"

While testing it, it works fine when the delay is set to 35 seconds: oConn.Execute =  "[SDI].dbo.spDelay '0:0:35'"

But if I put 50 seconds or a minute as provided above, I get an error:

[Microsoft][ODBC SQL Server Driver] TimeOut Expired

I have gone to server --> Properties --> Connections --> and set Query timeout to 0 seconds but I still get the error.

The ActiveXScript sends emails to records in a table, I want the DTS to pause for a minute or 2 in between emails.
CREATE PROCEDURE spDelay (@interval CHAR(9))

AS

WAITFOR DELAY @interval

GO

Open in new window

0
Comment
Question by:printmedia
  • 2
  • 2
4 Comments
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22796677
I would say that your command timeout in your DTS connection string is set too low then.  Double check the commandtimeout of your oconn connection object.
0
 

Author Comment

by:printmedia
ID: 22796888
Ah, I didn't set the timeout, how can I set it to indefinite, as there may be times where there are 100 emails to send out I wouldn't know how long it would take to send them out.
0
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 500 total points
ID: 22797075
oconn.commandtimeout=0
0
 

Author Comment

by:printmedia
ID: 22797272
Great thanks!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

747 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

8 Experts available now in Live!

Get 1:1 Help Now