SQL Server Trigger question

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default SQL Server Trigger question

    Hi All,

    I have a cf app accessing data from a database that is controlled primarily by
    our MRP software. My problem isn't really ColdFusion related, but MS SQL. Sorry
    for posting it here, but I am a CF programmer, not an SQL guru.

    I wrote a trigger to capture records (and copy them to an external table) as
    they are inserted from within the MRP. (MS SQL Server 2000). The trigger is
    succefull when I manually insert records, but not when the MRP inserts them. I
    can only assume, that the MRP inserts the records from within a transaction,
    and because my trigger fires during that transaction, the transaction fails and
    get rolled back.

    How do I write a trigger that wont interupt the transaction?

    Any help would be great! Thanks!


    ego-adam Guest

  2. Similar Questions and Discussions

    1. trigger question
      Hi I have the following tables TranDetails (3rd Party) with 4 fields making up primary key Supplier char 7 GRN char 7 Journal decimal...
    2. An trigger question
      Hi,all: I want to create some trigger on an important database,my database is IDS2000. My question is: If exist a way to limit me only can create...
    3. question about trigger
      Hello, I would like to use trigger to record change in every field (F1, F2, F3..) from table TAB1. CREATE TRIGGER TR1 AFTER UPDATE OF F1, F2,...
    4. Trigger question ...
      We have about 50 customers in hosted environment, each running databases withi identical schema but different names. Part of the application traps...
    5. Simple trigger question
      I'm real rusty with triggers..and I need one fairly quickly, so I would really appreaciate a bit of help. All I need to do: Upon insert or...
  3. #2

    Default Re: SQL Server Trigger question

    I'm not a SQL Server guru, but wouldn't your trigger be considered to be a
    nested transaction if it was written that way? I've never used triggers in SQL
    Server myself, but I have used them with Oracle, so it wouldn't hurt to take a
    look at how it was written.

    There is a lot of information in SQL Server BOL regarding nesting
    transactions, rollbacks in stored procedures and triggers, etc., which may shed
    some light on how to write your trigger to fire within a transaction and not
    get rolled back.

    Phil

    paross1 Guest

  4. #3

    Default Re: SQL Server Trigger question

    A trigger firing will no cause a transaction to rollback
    use profiler to capture the SQL from your MRP, then rerun the exact statement in QA and see what happens
    SQLMenace Guest

  5. #4

    Default Re: SQL Server Trigger question

    There was a bug in SQL Server INSERT triggers found in 3.4 and fixed in 3.5.

    See if the 3.5 driver description (in the coldfusion hotfix site) is the problem you're having.


    sdupre Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139