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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run extremely long stored proc on SQL server in c#?

Status
Not open for further replies.

huckfinn19

Programmer
May 16, 2003
90
CA
Hi all,

I need to have a thread that runs a stored procedure that can take up to an hour to process. This task is going to be scheduled to run at night on a DB server and the code that runs it has to be C#.

The stored proc runs fine when executed in the query analyser, but I get timeouts when I try to run it from the code.

How can I achieve this while making sure there is never any timeouts?

I am using .Net framework 1.1 and SQL Server 2000

Thanks!

Huck
 
set the CommandTimeout property of the command object to 0

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top