Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Testing SQL Timeout 1

Status
Not open for further replies.

RileyCat

Programmer
Apr 5, 2004
124
US
Is there such a thing as forcing a timeout in a stored procedure? If so, what is the syntax for doing so?

Stay Cool Ya'll! [smile2]

-- Kristin
 
You can cause SQL Server to wait for a specified period time. Like this...

Code:
Waitfor Delay '0:00:30'

If you run this, it will take exactly 30 seconds to execute.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Hi;

I don't think so, it is not possible in stored procedure. However, timeout actually deals with connections, so if you are calling stored procedure then there is a connection timeout property of command object in VB.NET or C# , you can increase your connection timeout when you call that stored procedure useing command object.

Thanks

 
The "Waitfor Delay" call worked beautifully.

Thank you.

Stay Cool Ya'll! [smile2]

-- Kristin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top