Re: VBscript Timed out

From: Dan Guzman (danguzman_at_nospam-earthlink.net)
Date: 06/29/04


Date: Mon, 28 Jun 2004 19:24:12 -0500

You can either set the CommandTimeout property on the Connection object or
create a Command object and set the CommandTimeout property. Either method
will override the default timeout interval.

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
"rob" <rwc1960@bellsouth.net> wrote in message
news:RhVDc.131$W67.26@bignews4.bellsouth.net...
> Thanks again Dan,
>
> If an update is being run in the following fashion and is timing out,
should
> a Command object be established in its place ?
>
> strSQL = "Update ....."
> ADOcon.Execute strSQL
>
>
>
>
> "Dan Guzman" <danguzman@nospam-earthlink.net> wrote in message
> news:%23FeMBIRXEHA.2636@TK2MSFTNGP10.phx.gbl...
> > 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
> >
> > "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 ?
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: ADODB Command memory leak
    ... My logic is such that the connection to the database is not maintained ... between calls to the Execute() method. ... Create/Append command parameters ... Destroy the command object ...
    (microsoft.public.data.ado)
  • Re: Temp table not visible in same SqlConnection
    ... turn off connection pooling, or use the same command object for all your ... > Any ideas why a temp table isn't visible on the same connection? ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: timeout
    ... With ADO there is ... the CommandTimeout property on the connection or a command object ...
    (microsoft.public.sqlserver.programming)
  • Re: Transaction Scope
    ... If you did not specify transaction for the command, ... > One approach is that you open a connection and then begin the transaction. ... > you are executing a command object you assign the transaction object to ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: Dialin problem
    ... # /etc/ppp/ppp.conf File for dial out modem to ISP and Dial in modem ... # connection to this FBSD system. ... # it's default options profile set to, NO command echo ATE0 and NO ... Edit /etc/ttys to enable a getty on the port where the dialin ...
    (freebsd-questions)