Main Page | Report this Page
.NET DotNet Forum Index  »  ASP.NET Forum  »  How to launch stored procedure without waiting for...
Page 1 of 1    

How to launch stored procedure without waiting for...

Author Message
Lyle Bruney...
Posted: Mon Nov 02, 2009 5:33 pm
Guest
I have a asp page that launches a specified stored procedure using the
sqlCommand object. The stored procedure will take several hours to complete
so I don't want the user to wait around for the response.

Is there a solid method/solution for ensuring that the stored procedure is
fired off and then the web page can be closed without repercussions to the
requested stored procedure execution?

I have tried using the sqlCommand object's (BeginExecuteNonQuery()) method
but it requires the ENdExecuteNonQuery() method before it completes and
allows the code to continue forward.

What alternative solutions and/or answers to this question can be utilized?

Thanks in advance!
 
bruce barker...
Posted: Mon Nov 02, 2009 9:34 pm
Guest
the sp should be setup as a sqljob. the asp.net page can start the job
via a sp call.

-- bruce (sqlwork.com)

Lyle Bruney wrote:
Quote:
I have a asp page that launches a specified stored procedure using the
sqlCommand object. The stored procedure will take several hours to complete
so I don't want the user to wait around for the response.

Is there a solid method/solution for ensuring that the stored procedure is
fired off and then the web page can be closed without repercussions to the
requested stored procedure execution?

I have tried using the sqlCommand object's (BeginExecuteNonQuery()) method
but it requires the ENdExecuteNonQuery() method before it completes and
allows the code to continue forward.

What alternative solutions and/or answers to this question can be utilized?

Thanks in advance!
 
Mr. Arnold...
Posted: Mon Nov 02, 2009 11:23 pm
Guest
Lyle Bruney wrote:
Quote:
I have a asp page that launches a specified stored procedure using the
sqlCommand object. The stored procedure will take several hours to complete
so I don't want the user to wait around for the response.

Is there a solid method/solution for ensuring that the stored procedure is
fired off and then the web page can be closed without repercussions to the
requested stored procedure execution?

I have tried using the sqlCommand object's (BeginExecuteNonQuery()) method
but it requires the ENdExecuteNonQuery() method before it completes and
allows the code to continue forward.

What alternative solutions and/or answers to this question can be utilized?


If you're running SQL 2005 or better, then use SQL Server Broker's
message queue to run the sproc asynchronous.

<http://visualstudiomagazine.com/articles/2006/06/01/program-sql-server-2005s-service-broker.aspx>
 
Lyle Bruney...
Posted: Fri Nov 06, 2009 3:54 pm
Guest
I can't create a sqljob to run this. Security issues/concerns by our network
security officer.

"bruce barker" wrote:

Quote:
the sp should be setup as a sqljob. the asp.net page can start the job
via a sp call.

-- bruce (sqlwork.com)

Lyle Bruney wrote:
I have a asp page that launches a specified stored procedure using the
sqlCommand object. The stored procedure will take several hours to complete
so I don't want the user to wait around for the response.

Is there a solid method/solution for ensuring that the stored procedure is
fired off and then the web page can be closed without repercussions to the
requested stored procedure execution?

I have tried using the sqlCommand object's (BeginExecuteNonQuery()) method
but it requires the ENdExecuteNonQuery() method before it completes and
allows the code to continue forward.

What alternative solutions and/or answers to this question can be utilized?

Thanks in advance!
.
 
Lyle Bruney...
Posted: Fri Nov 06, 2009 3:56 pm
Guest
I will look into this but at first glance, NOT easy to set up and implement.

Why doesn't the BeginExecuteNonQuery() method work like it was designed??



"Mr. Arnold" wrote:

Quote:
Lyle Bruney wrote:
I have a asp page that launches a specified stored procedure using the
sqlCommand object. The stored procedure will take several hours to complete
so I don't want the user to wait around for the response.

Is there a solid method/solution for ensuring that the stored procedure is
fired off and then the web page can be closed without repercussions to the
requested stored procedure execution?

I have tried using the sqlCommand object's (BeginExecuteNonQuery()) method
but it requires the ENdExecuteNonQuery() method before it completes and
allows the code to continue forward.

What alternative solutions and/or answers to this question can be utilized?


If you're running SQL 2005 or better, then use SQL Server Broker's
message queue to run the sproc asynchronous.

http://visualstudiomagazine.com/articles/2006/06/01/program-sql-server-2005s-service-broker.aspx
.
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sun Dec 06, 2009 9:09 am