Stefano (stefano.larosa@_Cancellatequesto.fastwebnet.it) writes:[color=blue]
> I run a View using enterprise manager and after less then 20 second it
> goes in error time out. I run this view using a VB application and the
> error comes again .When i run it with Query Analyzer after 50 seconds it
> give me the right result.
> i've tried to change the value of querytimeout using sp_configure with the
> same bad result.
>
> i've tried to change the ado command timeout in visul basic but still
> doesn't work.[/color]
The timeout is purely a client-side thing, so sp_configure is not going
to help you. (That one is for distributed queries, when the SQL Server is
the client to another server.)
QA has a query command which 0 by default, that is no timeout. Good boy.
EM has a default timeout of 30 seconds, and may be changeable, but maybe
not for everything.
In VB, the property .CommandTimeout is your man. But you may have to set
it both on the Connection object and the Command object. I believe that
the Command object does not inherit it from the Connection object.
--
Erland Sommarskog, SQL Server MVP,
sommar@algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp