Connection.ConnectionTimeout, Connection.CommandTimeout and
Command.CommandTimeout properties are all read/write so you can display
values using the technique below.
Set connection = CreateObject("ADODB.Connection")
MsgBox connection.ConnectionTimeout
Note that ConnectionTimeout and CommandTimeout are different beasts. The
ConnectionTimeout specifies how ling ADO should wait for the connection to
be established, although the actual time may be longer depending on the
cause for the delay.
Connection.CommandTimeout specifies how long a command invoked via
Connection.Execute can run but Command objects to not inherit this setting.
You'll need to set the Command.CommandTimeout separately.
--
Hope this helps.
Dan Guzman
SQL Server MVP
[quoted text, click to view] "rob" <rwc1960@bellsouth.net> wrote in message
news:icUDc.112$0v6.106@bignews6.bellsouth.net...
> Thanks Dan
>
> I assume a command such as ADOcon.ConnectionTimeout = 60 will work for the
> connection as well. Do you know how to return the Connection Timeout
value
> to a variable in VBscript ? I would like to display it in a message box
> for testing purposes.
>
> Rob
>
> "Dan Guzman" <danguzman@nospam-earthlink.net> wrote in message
> news:uH3MKwLXEHA.3476@tk2msftngp13.phx.gbl...
> > You can override the 30 second default timeout with the CommandTimeout
> > property of the ADO Command object.
> >
> > --
> > Hope this helps.
> >
> > Dan Guzman
> > SQL Server MVP
> >
> > "rob" <rwc1960@bellsouth.net> wrote in message
> > news:BqLDc.1121$1D2.1085@bignews5.bellsouth.net...
> > > I have a dts package that contains a portion of VB script... every now
> and
> > > then I get a timed out error message... any ideas ? Any way to
> increase
> > > the time out within the vbscript ?
> > >
> > >
> > >
> >
> >
>
>