Reply
Trigger gives error
Old 12-11-2007, 12:46 PM Trigger gives error
Skilled Talker

Posts: 60
Name: Nick Martin
I get the following error when I execute my Insert Trigger:

commit/rollback not allowed within atomic operation trigger stored procedure

The trigger appears to be the problem because if I comment out the last line of the trigger it works. The stored procedure is much more complex but it runs successfully if I harcode the parameter value in. Can someone shed some light on this one please?

This is the trigger:
Code:
DBA.vinTrigger
for each row /* REFERENCING NEW AS new_name */
/* WHEN( search_condition ) */
begin
  declare @datapath varchar(200);
  set @datapath=(select datapath from vinTrigger where ID = (select MAX(ID) from vinTrigger));
  call VINImport(@datapath)
end
SpudNik is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 12-11-2007, 01:40 PM Re: Trigger gives error
Learning Newbie's Avatar
Moderator

Latest Blog Post:
Republicans Are In Trouble
Posts: 5,531
Name: John Alexander
What goes on in the VINImport procedure you're calling out to? Maybe a nested transaction?
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Trigger gives error
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11418 seconds with 12 queries