Professional Web Applications Themes

rollback transaction erro - Microsoft SQL / MS SQL Server

hi all, i was wondering if you could shed some light on this error. 'rollback transaction request has no corresponding begin transaction.' any help would be greatly appreciated. thank you. the following trigger causes the error... create trigger uwdstatus1 on contact2 for update as if exists (select * from inserted where (uwdstatus like '7%'or uwdstatus like '8%' or uwdstatus like '9%')) BEGIN update testprospect.dbo.contact2 set testprospect.dbo.contact2.ut_status = '4 Backburner', testprospect.dbo.contact2.ut_predt = getdate() from inserted where testprospect.dbo.contact2.ut_uid = inserted.utransno END...

  1. #1

    Default rollback transaction erro

    hi all, i was wondering if you could shed some light on
    this error. 'rollback transaction request has no
    corresponding begin transaction.' any help would be
    greatly appreciated. thank you.

    the following trigger causes the error...

    create trigger uwdstatus1 on contact2
    for update as
    if exists (select * from inserted where (uwdstatus
    like '7%'or uwdstatus like '8%'
    or uwdstatus like '9%'))
    BEGIN
    update testprospect.dbo.contact2
    set testprospect.dbo.contact2.ut_status = '4 Backburner',
    testprospect.dbo.contact2.ut_predt = getdate()
    from inserted
    where testprospect.dbo.contact2.ut_uid = inserted.utransno
    END

    harbir Guest

  2. #2

    Default Re: rollback transaction erro

    An error in a trigger or with a linked server (you have both) will terminate
    the SQL batch that is running and rollback any open transactions, so if the
    update statement that fires the trigger is inside a transaction that will be
    rolled back. You have to do some debugging to see what the actual problem
    is, your linked server might not be online for example.

    It is good practice to check if there are any open transactions before you
    either commit or rollback.

    You can do this with:
    IF TRANCOUNT > 0 COMMIT/ROLLBACK TRAN


    "harbir" <com> wrote in message
    news:092601c34af9$b13d69d0$gbl... 


    Jacco Guest

Similar Threads

  1. cfhttp erro
    By larry_s_w in forum Coldfusion - Advanced Techniques
    Replies: 1
    Last Post: March 24th, 10:35 PM
  2. TYpe Mismatch erro
    By vinu thomas in forum ASP Components
    Replies: 1
    Last Post: January 6th, 04:03 PM
  3. RIGHT function #erro
    By Frank Dulk in forum Microsoft Access
    Replies: 2
    Last Post: July 16th, 04:16 PM
  4. How many rollback segments can a transaction use?
    By michael ngong in forum Oracle Server
    Replies: 4
    Last Post: July 10th, 07:01 AM
  5. Commit inner transaction rollback outer
    By Kresimir Radosevic in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: July 2nd, 08:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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