Sunday, March 11, 2012

Connection.CommandTimeout

Running VB6 with SQL Server 7, opening a connection and setting this
parameter by Conn.CommandTimeout does not always seem to force a
command (stored procedure) executed through Conn.Execute to timeout
after the specified period. Is anybody able to suggest what may be
going on here.

Thankspeter.dawson@.kingsch.nhs.uk (Petros) wrote in message news:<478ba33e.0309300533.2e31f9f7@.posting.google.com>...
> Running VB6 with SQL Server 7, opening a connection and setting this
> parameter by Conn.CommandTimeout does not always seem to force a
> command (stored procedure) executed through Conn.Execute to timeout
> after the specified period. Is anybody able to suggest what may be
> going on here.
> Thanks

CommandTimeout starts when the database server has accepted the
command and ends when the database server returns the first record. If
the server or network is busy (or not answering at all), this setting
won't help you to get control again.|||Petros (peter.dawson@.kingsch.nhs.uk) writes:
> Running VB6 with SQL Server 7, opening a connection and setting this
> parameter by Conn.CommandTimeout does not always seem to force a
> command (stored procedure) executed through Conn.Execute to timeout
> after the specified period. Is anybody able to suggest what may be
> going on here.

If you are also running queries from the command object, you need
to see the .CommandTimeout for that object too; the value is not
inherited from the connection object.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

No comments:

Post a Comment