Friday, February 24, 2012

can I specify timout for views/sp?

Hi,
I have some queries in my sql 2000 server that need a long timout (>60
sec.). Is there a way to specify a timeout for a view or stored procedure
that returns a recordset?
Will the ADO Connection.CommandTimeout solve my problem (can I set this just
before executing the query)? MSDN tells me in Q190606 to use an
asynchrounous query for executing long time queries (because of a bug in the
Connection.CommandTimeout property), but my component is running in an ASP
application, so a timer to check the execution status is not really easy to
implement.
Thanks for your time,
SvenSven,
According to this KB note http://tinyurl.com/j23d you may need to use the
Command.CommandTimeout instead of the Connection.CommandTimeout. It says
"the Command object does not pickup the Connection's CommandTimeout
setting."
This is specific to a command issued from your application. There is no way
to set a timeout for a specific view or stored procedure.
Russell Fields
"Sven Erik Matzen" <sven.matzen@.dontspamme.com> wrote in message
news:ODf1KEyWDHA.1680@.tk2msftngp13.phx.gbl...
> Hi,
> I have some queries in my sql 2000 server that need a long timout (>60
> sec.). Is there a way to specify a timeout for a view or stored procedure
> that returns a recordset?
> Will the ADO Connection.CommandTimeout solve my problem (can I set this
just
> before executing the query)? MSDN tells me in Q190606 to use an
> asynchrounous query for executing long time queries (because of a bug in
the
> Connection.CommandTimeout property), but my component is running in an ASP
> application, so a timer to check the execution status is not really easy
to
> implement.
> Thanks for your time,
> Sven
>|||Will the Connection.CommandTimeout work when using the Recordset object with
the connection? I currently don't have a command object.
"Russell Fields" <rlfields@.sprynet.com> wrote in message
news:#1TfuC2WDHA.1384@.TK2MSFTNGP10.phx.gbl...
> Sven,
> According to this KB note http://tinyurl.com/j23d you may need to use the
> Command.CommandTimeout instead of the Connection.CommandTimeout. It says
> "the Command object does not pickup the Connection's CommandTimeout
> setting."
> This is specific to a command issued from your application. There is no
way
> to set a timeout for a specific view or stored procedure.
> Russell Fields
> "Sven Erik Matzen" <sven.matzen@.dontspamme.com> wrote in message
> news:ODf1KEyWDHA.1680@.tk2msftngp13.phx.gbl...
> > Hi,
> >
> > I have some queries in my sql 2000 server that need a long timout (>60
> > sec.). Is there a way to specify a timeout for a view or stored
procedure
> > that returns a recordset?
> >
> > Will the ADO Connection.CommandTimeout solve my problem (can I set this
> just
> > before executing the query)? MSDN tells me in Q190606 to use an
> > asynchrounous query for executing long time queries (because of a bug in
> the
> > Connection.CommandTimeout property), but my component is running in an
ASP
> > application, so a timer to check the execution status is not really easy
> to
> > implement.
> >
> > Thanks for your time,
> > Sven
> >
> >
>

No comments:

Post a Comment