Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - How to launch stored procedure without waiting for response

 
Thread Tools Search this Thread
Old 11-02-2009, 10:33 PM   #1
Default How to launch stored procedure without waiting for response


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
  Reply With Quote
Old 11-03-2009, 02:34 AM   #2
bruce barker
 
Posts: n/a
Default Re: How to launch stored procedure without waiting for response
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!



bruce barker
  Reply With Quote
Old 11-03-2009, 04:23 AM   #3
Mr. Arnold
 
Posts: n/a
Default Re: How to launch stored procedure without waiting for response
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>


Mr. Arnold
  Reply With Quote
Old 11-06-2009, 08:54 PM   #4
Lyle Bruney
 
Posts: n/a
Default Re: How to launch stored procedure without waiting for response
I can't create a sqljob to run this. Security issues/concerns by our network
security officer.

"bruce barker" wrote:

> 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
  Reply With Quote
Old 11-06-2009, 08:56 PM   #5
Lyle Bruney
 
Posts: n/a
Default Re: How to launch stored procedure without waiting for response
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:

> 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>
> .
>



Lyle Bruney
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MCITP and stored procedure permissions Darrilgibson@gmail.com MCITP 5 06-07-2008 12:37 PM
Windows XP takes too long to start up silva.antonio@gmail.com Computer Support 2 05-25-2006 02:50 AM
Disabling Task Mgr. in Windows XP Bob H Computer Support 9 02-05-2006 05:02 AM
samson complex, a tool for the underdog underdog bites back Computer Support 0 12-12-2005 07:55 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46