Use CommandTimout instead.
conn.CommandTimeout = 120 ' or whatever
The default is 30.
--
Tim Zych
SF, CA
"Joe K." <Joe K.@discussions.microsoft.com> wrote in message
news:2228D055-9AF8-41F2-AA95-(E-Mail Removed)...
>
> I am trying to connect to a SQL Server 2005 database using the connection
> parameters listed below. After connecting to the SQL Server 2005 database
> I
> execute my sql statement. But I always timeout after approximately 60
> seconds. I executed the sql statement within the query analyzer which
> takes
> approximately 90 seconds to complete. Is there something I can add to my
> connection parameters listed below so it will not timeout?
>
> Thanks,
>
>
> Set oConn = New Connection
> With oConn
>
> .ConnectionString = "Provider = SQLOLEDB;" & _
> "Data Source = " & SOURCE_NAME & ";" & _
> "Initial Catalog = " & DB_NAME & ";" & _
> "Integrated Security = SSPI"
> .ConnectionTimeout = 2000
> .Open
> End With
>
|