Re: ADO.NET Timout



Sure it will (timeout). You need to set the Command.Timeout property to the
number of seconds required to complete the operation. 0 :: wait
indefinitely. I don't recommend this approach as your execution thread will
hang indefinitely.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"Lit" <sql_agentman@xxxxxxxxxxx> wrote in message
news:Oh9mTPJlGHA.3528@xxxxxxxxxxxxxxxxxxxxxxx
William,

So the 30 sec Connection Timeout will have no effect when a SP called
asynchronously?
Do I still have to give it a higher time value?
What I am trying to do is call a SP and let it execute no matter how long
it takes it.
Being asynchronous does not mean it is not going to timeout?

Thanks

Lit

"William (Bill) Vaughn" <billvaRemoveThis@xxxxxxxxxx> wrote in message
news:O7kzv$IlGHA.4024@xxxxxxxxxxxxxxxxxxxxxxx
A SP can be called asynchronously from ADO.NET (2.0) by using the
BeginExecute method of the Command object. ADO classic supports async ops
as well. I'll be discussing this in my session on Async operations at
VSLive this week (Thursday 11:30) in Vegas.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________

"Lit" <sql_agentman@xxxxxxxxxxx> wrote in message
news:exSXh3IlGHA.4872@xxxxxxxxxxxxxxxxxxxxxxx
Mary,

How can I call a stored procedure to do its thing asynchronously.

What is the best way of doing this?

Thank You,

Lit


"Mary Chipman [MSFT]" <mchip@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:mfs592l5gnd5lhm1pr28o9mt6q0d5bq1e0@xxxxxxxxxx
If the connection is terminated, then any active transactions that are
occuring inside the stored procedure that have not yet been committed
will be rolled back. Any committed transactions will be preserved. If
you want all work items inside of the stored procedure to be handled
as a single unit of work, you can implement an explicit transaction.
For more information, see "Explicit Transactions" in SQL Server Books
Online.

--Mary

On Wed, 14 Jun 2006 11:53:31 -0700, "Lit" <sql_agentman@xxxxxxxxxxx>
wrote:

Hello,

The default ADO.NET Timeout is 30 seconds.
If I execute a Stored procedure that takes lets say 120 seconds then
what
happens.

ADO.NET Times and throws an exception

But what about SQL Server Does SQL Server keep on Executing the Stored
procedure?

Thanks

Lit









.



Relevant Pages

  • Re: Problem with the Legacy ASP files and the Sql Server Express
    ... It looks like it is not going to be an easy job getting it to work on the SQL Server 2005 and Express:(. ... 'Then you can execute the command and then retrieve the ID ... I am 100% sure this code works against any version of SQL Server, as long as the connection is OK and the SP has two parameters @varCompany as Input and @Return_Value as Output. ... I do not think your problem is due to difference of SQL Server2000 and SQL Server2005, unless your stored procedure has some thing that only works in SQL Server2000, not SQL Server 2005. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Stored Procedure Security/Permissions
    ... Cross-Database Ownership Chaining Behavior Changes in SQL Server 2000 ... > permission to read either table; ... > permission to execute the stored procedure, ...
    (microsoft.public.sqlserver.security)
  • Re: ADO.NET Timout
    ... So the 30 sec Connection Timeout will have no effect when a SP called ... Do I still have to give it a higher time value? ... How can I call a stored procedure to do its thing asynchronously. ... But what about SQL Server Does SQL Server keep on Executing the Stored ...
    (microsoft.public.dotnet.framework.adonet)
  • Connection.Execute and SQL stored procedures
    ... ..asp, the connection object and MS SQL Server as the DB can help me out. ... Five of the six calls execute as expected. ... This particular stored procedure does quite a bit of work within the DB, ...
    (microsoft.public.sqlserver.odbc)
  • Re: ADO.NET Timout
    ... That in turn execute SP ... BeginExecute method of the Command object. ... How can I call a stored procedure to do its thing asynchronously. ... see "Explicit Transactions" in SQL Server Books ...
    (microsoft.public.dotnet.framework.adonet)