Exception: Timeout expired

D

Dean Slindee

"The timeout period elapsed prior to completion of the operation or the
server is not responding".
ExceptionType: System.Data.SqlClient.SqlException
Method: OnError

I am getting the above error message when calling a long running stored
procedure from a VS2005 WinForm application. Using Windows 2000 OS with SQL
Server 2000, ADO.NET, Framework 2.0. The stored procedure just takes some
time to build a lot of tables in SQL Server. To be a little more precise,
the one stored procedure calls four more stored procedures (doubt it
matters, but just in case...)

So, my question is this: is there a setting in VS2005 or SQL Server that I
can turn off or extend so that this timeout is disabled?

Thanks in advance.
Dean Slindee
 
S

Stephany Young

Set the CommandTimeOut property of the SqlCommand object to whatever you
need.
 
M

Michel Posseth [MCP]

The standard time out is 20 seconds , so you need to high up the command
time out to the required value

regards

Michel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top