>I'm trying to create a Windows Forms interface to launch end of month queries, each of which requires several minutes to generate results. I have a stored procedure (query) that requires app. 2-3 minutes running time in SQL Server. It runs fine in Query Manager, but when I run it directly from a C# app. in app. 30 seconds I get the error message: The timeout period elapsed prior to completion of the operation or the server is not responding.
That is controlled by SqlCommand.CommandTimeOut and the default is 30 seconds. You should be able to get a connection from the framework and create your own command object with a different CommandTimeOut to execute your store procedure.
Stephen Lee
--------------------------------
Too much to code
Too little time
--------------------------------