Table locking?

  • 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

  • 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://qa.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


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Jeff,

    Sorry about that. I thought maybe I put it in the wrong place. Is there a way to cancel this thread?

    Mike

  • 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


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply