Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mikejohnson
Posting Yak Master
153 Posts |
Posted - 2004-07-30 : 12:21:25
|
| i have a sp that takes several minutes to execute. i'm calling this sp from my asp code. however, i just want the asp code to get the sp started and move on. so i don't want the page to wait until the sp is finished to keep processing. how do i do this? |
|
|
chadmat
The Chadinator
1974 Posts |
Posted - 2004-07-30 : 13:22:16
|
| In asp.net, it is very simple to create a worker thread, or use a thread out of the ThreadPool. Then use the thread to call your SP. I do this from time to time when I need no response from a long running process. Howevcer, I'm not sure it is so easy in asp. I haven't had to do it, so I can't comment on ASP.-Chadhttp://www.clrsoft.comSoftware built for the Common Language Runtime. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-07-30 : 13:45:00
|
| I do this by starting a job that execute the sproc....Brett8-) |
 |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2004-08-01 : 04:29:21
|
| Yeah, Bretts solution should work fine. Create a job that executes the procedure and then run this from your asp:EXEC sp_start_job @job_name = 'job_name' |
 |
|
|
larrykl
Yak Posting Veteran
67 Posts |
Posted - 2004-08-05 : 20:11:51
|
| I had a similar question that this may resolve.I've never used this job feature. How do I create a job and how do I pass parameters from ASP to the stored procedure via the job? Thanks! |
 |
|
|
jhermiz
3564 Posts |
Posted - 2004-08-07 : 11:22:54
|
| Got Enterprise Manager? Pop it open and look under "Management" then there is a a section called "SQL Server Agent" drill down and you will see jobs. Right click and select add new. Create your job and then do a:EXEC sp_start_job @job_name = 'YourJobName'Jonwww.web-impulse.comCan you dig it: http://www.thecenturoncompany.com/jhermiz/blog/ |
 |
|
|
|
|
|