All,

I am using C# to a SQL Server 2005 database using an SqlDataAdapter,
SqlCommand and SqlDataReader.
When running the query I receive the following exception:
"Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding."

Does anyone know how to increase the timeout value for a query?
Thanks in advance,

Scott

Re: Query Timeout Expired Using SELECT/WHERE by Marina

Marina
Mon May 08 10:19:41 CDT 2006

Set the CommandTimeout property of the SelectCommand property of the
SqlDataAdapter object you are using.

"Scott" <Scott@discussions.microsoft.com> wrote in message
news:4E416485-E2F7-4932-980F-BE59145C0A2D@microsoft.com...
> All,
>
> I am using C# to a SQL Server 2005 database using an SqlDataAdapter,
> SqlCommand and SqlDataReader.
> When running the query I receive the following exception:
> "Timeout expired. The timeout period elapsed prior to completion of the
> operation or the server is not responding."
>
> Does anyone know how to increase the timeout value for a query?
> Thanks in advance,
>
> Scott



Re: Query Timeout Expired Using SELECT/WHERE by Scott

Scott
Mon May 08 10:59:01 CDT 2006

That worked.
Thanks!

Re: Query Timeout Expired Using SELECT/WHERE by Jeff

Jeff
Mon May 08 11:03:49 CDT 2006

But increasing the timeout should always be the last resort. You should perf
tune your query

Jeff

"Scott" <Scott@discussions.microsoft.com> wrote in message
news:F319478D-FBF5-468A-83B0-EC720ABA62E0@microsoft.com...
> That worked.
> Thanks!



Re: Query Timeout Expired Using SELECT/WHERE by Scott

Scott
Mon May 08 11:34:02 CDT 2006

Jeff,

Can you expiain how to tune a query. Using what tools?

Thanks,
Scott

"Jeff Dillon" wrote:

> But increasing the timeout should always be the last resort. You should perf
> tune your query
>
> Jeff
>
> "Scott" <Scott@discussions.microsoft.com> wrote in message
> news:F319478D-FBF5-468A-83B0-EC720ABA62E0@microsoft.com...
> > That worked.
> > Thanks!
>
>
>

Re: Query Timeout Expired Using SELECT/WHERE by Jeff

Jeff
Mon May 08 13:42:13 CDT 2006

Using Query Analyzer, you can turn on various settings like Graphical
Showplan.

Is this just a single query?

Can you can also just post the code here, with appropriate table definitions
and sample data.

Jeff

"Scott" <Scott@discussions.microsoft.com> wrote in message
news:350BA6DC-1C94-45DF-99C5-36C1D802DDFD@microsoft.com...
> Jeff,
>
> Can you expiain how to tune a query. Using what tools?
>
> Thanks,
> Scott
>
> "Jeff Dillon" wrote:
>
>> But increasing the timeout should always be the last resort. You should
>> perf
>> tune your query
>>
>> Jeff
>>
>> "Scott" <Scott@discussions.microsoft.com> wrote in message
>> news:F319478D-FBF5-468A-83B0-EC720ABA62E0@microsoft.com...
>> > That worked.
>> > Thanks!
>>
>>
>>