What you are setting is the connection timeout. That means how long the
connection waits while trying to connect to the database server before
giving up.
This is in no way related to the timeout when executing commands. Not sure
why you thought it would be.
Follow Gary's advice for setting the CommandTimeout to control the timeout
while executing commands.
"Martin Eyles" <martin.eyles@NOSPAMbytronic.comwrote in message
news:12cs37c14oriqe0@corp.supernews.com...
Quote:
>I am trying to perform a very long query on an MSSQL database, using
ASP.NET, and making the code behind in VB.NET. I have been receiving
timeout
error, so I thought I would add Connect Timeout to my connection string.
However this appears to have no effect. The connection string is set up as
follows
>
Dim conn As New SqlClient.SqlConnection("Data Source=serverName; User
ID=userName; Password=password; Connect Timeout=9999")
>
Any ideas why this isn't changing the timeout?
>
Thanks,
Martin
>
>
>