Re: Timeout Expired




"Herb" <Herb@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EFD0C725-E1BF-4F23-A64E-0C4B555CD01A@xxxxxxxxxxxxxxxx
> Hello,
>
> I'm running a large INSERT query against a SQL Server database using an
> ADO
> conenction as follows:
>
> DIM X as new adodb.connection
> x.connectiongstring="Provider=SQLOLEDB.1;Initial
> Catalog=BookkeeperSource;Data Source=PTLPSRV02;Integrated Security=SSPI;
> Persist Security Info=False; Connection Timeout=480"
>
> DIM y as new ADODB.COmmend
>
> x.open
> y.ActiveConnection=x
> y.CommandTimeout = 480
>
> y.CommandText = "INSERT INTO Archives (ArchiveID, Val1, Val2, val3)
> SELECT
> ArchiveID, val1, val2, val3 from OldArchive"
>
> y.Execute
>
> This cause a Timeout Expired after about 30 seconds. Regardless of how
> long
> I set either the connection or command timeout for.

The ConnectionTimeout is inconsequential to execution. The connection
object also has a CommandTimeout property, but it should not affect this
either. (You really don't need the command object, btw, you could just call
x.Execute "INSERT ...", but here nor there.)

What, specifically, does the error message say? Or better asked, in what
sub-system does the error occur?


-Mark




> Any help would be apprceciated.
> Thank you, Herb
>
>


.



Relevant Pages