views:

441

answers:

1

Hi there,

I'm building an app in C#. I'm using a connection string like:

DSN=SomeDataSource; Trusted Connection = yes; Uid=SomeId; pwd=somePwd; Connection Timeout=x

But no matter what value I set as x (Connection Timeout = x), by putting a breakpoint, I can see that my DbConnection object's ConnectionTimeout property always has the default value 15.

Am I missing something here?

Thanks.

+3  A: 

The Connection Timeout in the ConnectionString only controls the timeout for the connection. If you need to increase the wait time on your Commands, use the CommandTimeout property of SqlCommand.

Ardman