May 16, 2010 at 11:17 am
Hi All.
(Reposted from other forum area)
I have table:
* Web_processing_queue
-- Web_processing_queue_id (int) identity(1,1)
-- task varchar(200)
-- processed_fl bit
I have the following trigger on Web_processing_queue
ALTER trigger [dbo].[tr_web_processing_queue] on
[dbo].[web_processing_queue] after INSERT AS
begin
DECLARE @id id
SELECT @id = IDENT_CURRENT('web_processing_queue')
exec usp_web_processing_queue @id
end
I have the following stored proc:
ALTER PROCEDURE [dbo].[usp_web_processing_queue]( @id id=NULL)
AS
begin
declare @cID varchar(200)
declare @cPgm varchar(1000)
set @cID = CAST( @id AS varchar(20))
set @cPgm = 'c:\om5\web_processing_queue.exe '+ @cid
EXEC master..xp_CMDShell @cPgm
end
In the external program, I get a link to the data via SQL native driver, and I want to change a processed_fl (bit) from 0 to 1 for the record that caused the trigger call.
I have the trigger set to "AFTER" but it still hangs. Any ideas?
Thanks,
Mike
May 16, 2010 at 12:23 pm
Please... no posts here so we don't split up any answers that may come down the pipe... the original post is at the following URL...
http://www.sqlservercentral.com/Forums/Topic922564-391-1.aspx
Mike... don't double post. I know you're probably in a hurry but your other post is only a couple of hours old and it IS the weekend. Someone will get to it. Double posting is only going to tick people off.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 16, 2010 at 12:29 pm
Jeff,
Sorry about that. I thought maybe I put it in the wrong place. Is there a way to cancel this thread?
Mike
May 16, 2010 at 12:33 pm
Nah... you're alright. The post I left above will direct people to the original thread.
Just so you know, a lot of the heavy hitters don't look at the individual forums. Many of them look at ALL the forums by using the "Recent Posts" menu items and they scan all posts across all forums. And, most of them have been a "newbie" at one point or another and will normally give those a little bit more priority.
I did answer on the other thread.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply